Azzera filtri
Azzera filtri

How to get 2D view of an ellipsoid?

9 visualizzazioni (ultimi 30 giorni)
Salar
Salar il 10 Mar 2016
Commentato: Salar il 10 Mar 2016
Hello,
I have a plot of an ellipsoid obtained by :
>> [x, y, z] = ellipsoid(0,0,0,xr,yr,zr);
figure
surf(x, y, z)
axis equal
Now I need to obtain 3 plots showing x Vs y & x Vs z & y Vs z, so basically I'll get 3 2D plots each showing an ellipse. Is there any Matlab command that'll do that ? I'd really appreciate your help.
Thank you!

Risposta accettata

Ced
Ced il 10 Mar 2016
Hi
You could use the "view" function for that, which allows you to set the viewing angle (azimuth and elevation). Note that the angles are in degrees, not radians.
For the choices mentioned:
xr = 1;
yr = 2;
zr = 1.2;
[x, y, z] = ellipsoid(0,0,0,xr,yr,zr);
surf(x, y, z);
axis equal
% Now change the view
% X vs Y
view(0,90)
pause
% X vs Z
view(0,0)
pause
% Y vs Z
view(90,0)
Cheers

Più risposte (0)

Categorie

Scopri di più su Geographic Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by