Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Undefined variable problem

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

05-09-2013
10:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
10:58 AM

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.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

05-09-2013
11:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:35 AM

Hi,

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

Hope this is informative

Regards

Andy

9 REPLIES 9

05-09-2013
11:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:31 AM

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

05-09-2013
11:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:43 AM

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.

05-09-2013
11:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:35 AM

Hi,

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

Hope this is informative

Regards

Andy

05-09-2013
11:38 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:38 AM

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)?

05-09-2013
11:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:53 AM

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.

05-09-2013
11:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
11:58 AM

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!

05-09-2013
12:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
12:01 PM

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

05-09-2013
12:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
12:09 PM

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.

05-09-2013
05:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-09-2013
05:16 PM

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