Plot 3D implicit function

1 回表示 (過去 30 日間)
moj dia
moj dia 2014 年 4 月 28 日
回答済み: Mischa Kim 2014 年 4 月 29 日
Hi How can I plot implicit function(ellipsoid) in matlab? A*x^2+B*y^2+C*z^2+2D*xy+2E*xz+2F*yz=1 2)How can I plot two ellipsoid in one figure?
Thanks so lot

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 4 月 29 日
Moj, there are different routes you can take. One would be symbolic
syms A B C D E F x y z
sol = solve(A*x^2+B*y^2+C*z^2+2*D*x*y+2*E*x*z+2*F*y*z-1==0, z);
sol1 = subs(sol(1),{A,B,C,D,E,F},{1,2,3,4,5,6});
sol2 = subs(sol(2),{A,B,C,D,E,F},{1,2,3,4,5,6});
ezsurf(sol1)
hold on
ezsurf(sol2)
The hold command allows you to add several plots in the same figure.

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by