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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Strange Graph Display

Cornel
19-Tanzanite

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.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(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
25-Diamond I
(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().

 

Announcements

Top Tags