Plot 3D implicit function
4 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Mischa Kim
on 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.
0 Comments
See Also
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!