Borrar filtros
Borrar filtros

How to get 2D view of an ellipsoid?

9 visualizaciones (últimos 30 días)
Salar
Salar el 10 de Mzo. de 2016
Comentada: Salar el 10 de Mzo. de 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!

Respuesta aceptada

Ced
Ced el 10 de Mzo. de 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

Más respuestas (0)

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by