Why is fimplicit not plotting x^2 = 0 ??
Ältere Kommentare anzeigen
I have a code that takes in an implicit function from the user and then plots it. However, I ran into this odd problem where fimplicit is not plotting anything when the function is x^2. The code I entered :
fimplicit(@(x,y) x.^2,[-5 5 -5 5],'b-');
The output is just a plain white plot. No blue line at x=0. However, if I simply change my function to x.^2 - 1, everything works as expected. I'm guessing there is some trouble caused by the fact that x^2 is "tangential" to zero. (I know that this may be incorrect terminology.)
Is there any workaround for this?
EDIT: I am looking for a fix not only for the case of x.^2. The recommended solution must also be able to plot implicit functions as that is the primary requirement.
Thanks,
Mohit.
Antworten (2)
madhan ravi
am 1 Okt. 2020
0 Stimmen
fplot()
KSSV
am 1 Okt. 2020
x = linspace(-5,+5,100) ;
y = x.^2 ;
plot(x,y)
1 Kommentar
Mohit Kumar
am 1 Okt. 2020
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!