How to get 2D view of an ellipsoid?

14 Ansichten (letzte 30 Tage)
Salar
Salar am 10 Mär. 2016
Kommentiert: Salar am 10 Mär. 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!

Akzeptierte Antwort

Ced
Ced am 10 Mär. 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

Weitere Antworten (0)

Kategorien

Mehr zu Geographic Plots 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