필터 지우기
필터 지우기

how to plot symbolic equation

조회 수: 4 (최근 30일)
zilai si
zilai si 2019년 5월 21일
답변: Star Strider 2019년 5월 21일
hello, everyone. I wonder how to plot a symbolic equation like this:
QQ图片20190521090609.png

채택된 답변

Star Strider
Star Strider 2019년 5월 21일
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개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by