how to plot symbolic equation
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
zilai si
am 21 Mai 2019
Beantwortet: Star Strider
am 21 Mai 2019
hello, everyone. I wonder how to plot a symbolic equation like this:
![QQ图片20190521090609.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/220384/QQ%E5%9B%BE%E7%89%8720190521090609.png)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 21 Mai 2019
That requires a bit of name-value pair arguments to the fcontour function.
Try this:
syms f(x,y) x y
f(x,y) = x^2 + (3*y/2 - sqrt(abs(x)))^2;
figure
fcontour(f, [-2 2], 'MeshDensity',250, 'LevelList',[3 3])
grid on
The 'LevelList' name-value pair argument is important here, since it will draw the contour where your function equals 3. .
I hope this is not homework. However, it likely requires a bit more familiarity with the MATLAB plot functions than someone just now learning MATLAB is likely to have.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!