cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined variable problem

RichardJ
19-Tanzanite

Undefined variable problem

When I use a numeric assignment with a symbolic evaluation I now get an undefined variable error. I am amazed I haven't noticed this before, and I am wondering when the bug cropped up. I'm running MC15 M020. Could someone with M010 check, and see if they get the same error.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Not sure what result you get in M020 but Mathcad version (M010 [MC15_M010_20110622]) gives this:Capture.PNG

Hope this is informative

Regards

Andy

View solution in original post

9 REPLIES 9
Werner_E
24-Ruby IV
(To:RichardJ)

I noticed that effect, too, but wasn't sure if its a new bug. Isn't this the "normal" behaviour of the numeric proc. choking on symbolic evals?

h is getting its symbolic value anyway and if you assign parameters to h even the numeric processor is happy

invlapl1.png

RichardJ
19-Tanzanite
(To:Werner_E)

It didn't always do this. I just checked MC13, and the evaluation with numeric assignment works fine (of course it gives an undefined variable error, but the symbolic result is displayed).

Good observation that h is actually getting the result though. That's probably why I haven't noticed it. I open up an older worksheet wiith something like this in it, and the end result works OK, so I never noticed the change in behavior. I guess I can work with it this way, but it's annoying.

Hi,

Not sure what result you get in M020 but Mathcad version (M010 [MC15_M010_20110622]) gives this:Capture.PNG

Hope this is informative

Regards

Andy

View solution in original post

Thanks. I get the same in M020, which I only installed recently. I am amazed I didn't notice it in M010. When did this bug get introduced? Anyone out there with version 14 installed that could try it (I know it works fine in MC13 and earlier, because I tried it)?

Werner_E
24-Ruby IV
(To:RichardJ)

As Andy (on contrary to MC15M020) is shown a result in MC15M010, it seems this was introduced with M020.

What I have noticed sometimes, especially with larger symbolic results in that situation was, that the result would be suddenly seen when I move the expression a bit. It did however not work with your file.

RichardJ
19-Tanzanite
(To:Werner_E)

Duh! I was really being blind there! Not sure how I missed the fact that what Andy showed is in fact NOT what I get in M020! Thanks for pointing that out.

Since I only just installed M020, that would be why I haven't noticd it before!

Note: at a slight tangent, Mathcad is picking up some information from the built in units:

C = 1 Coulomb

s = 1 second.

so if p is not in seconds then it is an error... according to the rules.

symbolic processor doesn't care, but the numeric will.

is it related to SUC? - perhaps.

regards

Andy

is it related to SUC? - perhaps.

Don't think so. Is behaves the same way if you change s and C for other names which are not associated with units.

The problem was not the error concerning the undefined variable (thats OK as it is thrown from the numeric processor) but that (in contrary to your version) the symbolic result is not shown when its assigned to h.

VladimirN
23-Emerald II
(To:RichardJ)

Result in Mathcad Prime 2.0 M010 version after conversion of worksheet:

Pic_1.PNG

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."