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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Filter out out NaN and Complex results?

dsochor
5-Regular Member

Filter out out NaN and Complex results?

In the attached worksheet there is a plot error (Plotting failed. Replace complex values and NaN by real numbers.) I've tried using failterNaN to remove the NaNs. Is there a way to remove the complex results?

ACCEPTED SOLUTION

Accepted Solutions

I can't open your sheet, only see the jpg's.

In Filter 1 you define ORIGIN:=0 (that's default any way.)

In Filter 2 you have

so the first element of xv is not defined, 0 by default, but no units.

I don't see where you define x, but:

suggests that x has no units--you put in feet and Mathcad divided by meters to balance the units.

I think that's your basic problem.

View solution in original post

7 REPLIES 7

I can't open your sheet, only see the jpg's.

In Filter 1 you define ORIGIN:=0 (that's default any way.)

In Filter 2 you have

so the first element of xv is not defined, 0 by default, but no units.

I don't see where you define x, but:

suggests that x has no units--you put in feet and Mathcad divided by meters to balance the units.

I think that's your basic problem.

Fred,

Please find PDF document of this worksheet in attachment.

Thanks!  It's interesting to see the entire sheet..

Werner_E
25-Diamond I
(To:dsochor)

filterNaN does not work the way you use it and would not help anyway.

A 2D plot will only fail with that error if ALL values are NaN or invalid and I suspect that the latter is the case.

I can't read P3.1 and I could not be bothered to switch between three JPGs to debug.

But I would suggest you try to evaluate your function V for a simple single value.

What happens if you type V(2 ft)= ? Where does the error trace to?

EDIT: Fred could possible be right (again). Try to define a range variable for x, like x:=1ft, 1ft+1in .. 10 ft or whatever seems appropriate.

Werner_E
25-Diamond I
(To:dsochor)

Just remote connected to a machine with P31 and can confirm, that Fred is right.

-MFra-
21-Topaz II
(To:dsochor)

filternan.jpg

dsochor
5-Regular Member
(To:-MFra-)

Thank you all very much, the issue was that x was not defined.

Announcements

Top Tags