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