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
- :
- Error: The function did not evaluate to a pure rea...

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

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

11-23-2015
06:20 AM

11-23-2015
06:20 AM

I have tried plotting multiple 3D graphs, but keep getting the error: The function did not evaluate to a pure real value

Does anybody have a prober fix to this?

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

11-23-2015
10:36 AM

11-23-2015
10:36 AM

This is a bit tricky as Mathcads 3D-plot is quite limited.

You can only plot over a rectangular area of the xy-plane.

You can set the x- and y limits when you double click the plot to get into the plot format menu and then chose the tab "QuickPlot Data".

If you set eg Range1 to run from -10 to 0 and Range2 from 2 to 10 you will see a plot as all meshpoint evaluate to real values.

As you have seen, the whole plot fails even if just one single pair (x,y) evaluates to a non-real number or to NaN.

Another way round is to redefine your function to return a dummy value (-1 in my example) in case the value would get non-real.

Then I set the z-axis manually to go from 0 to whatever seems appropriate so the dummy values are hidden.

One other thing is to use CreateMesh. It gives you a better control over the x- and y-limits and you don't have to change them in the format menu.

1 REPLY 1

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

11-23-2015
10:36 AM

11-23-2015
10:36 AM

This is a bit tricky as Mathcads 3D-plot is quite limited.

You can only plot over a rectangular area of the xy-plane.

You can set the x- and y limits when you double click the plot to get into the plot format menu and then chose the tab "QuickPlot Data".

If you set eg Range1 to run from -10 to 0 and Range2 from 2 to 10 you will see a plot as all meshpoint evaluate to real values.

As you have seen, the whole plot fails even if just one single pair (x,y) evaluates to a non-real number or to NaN.

Another way round is to redefine your function to return a dummy value (-1 in my example) in case the value would get non-real.

Then I set the z-axis manually to go from 0 to whatever seems appropriate so the dummy values are hidden.

One other thing is to use CreateMesh. It gives you a better control over the x- and y-limits and you don't have to change them in the format menu.