Plot 3D implicit function

2 次查看(过去 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 CenterFile Exchange 中查找有关 Vector Fields 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by