Plot 3D implicit function

2 Ansichten (letzte 30 Tage)
moj dia
moj dia am 28 Apr. 2014
Beantwortet: Mischa Kim am 29 Apr. 2014
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

Antworten (1)

Mischa Kim
Mischa Kim am 29 Apr. 2014
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.

Kategorien

Mehr zu Vector Fields finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by