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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Strange Graph Display

Cornel
18-Opal

Strange Graph Display

Hello,

I plotted this function and the graph looks something "strange", at least at first glance. Normally it should have shown a continuous line, or?

Cornel_0-1689419825218.png

Cornel_0-1689420065531.png

Cornel_1-1689419836364.png
MC8 Prime.

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:Cornel)

You function f() returns non-real numbers with a tiny imaginary part for a lot of input values. Maybe due to numerical inaccuracies/round offs. Primes plot refuses to plot anything in this case, hence the empty spots.

Werner_E_0-1689425469608.png

 

ttokoro showed that using just the real part of the result for plotting might be a solution to the problem.

You may also consider using the Re() function already in the definition of f().

 

View solution in original post

2 REPLIES 2
ttokoro
20-Turquoise
(To:Cornel)

image.png

Werner_E
24-Ruby V
(To:Cornel)

You function f() returns non-real numbers with a tiny imaginary part for a lot of input values. Maybe due to numerical inaccuracies/round offs. Primes plot refuses to plot anything in this case, hence the empty spots.

Werner_E_0-1689425469608.png

 

ttokoro showed that using just the real part of the result for plotting might be a solution to the problem.

You may also consider using the Re() function already in the definition of f().

 

Top Tags