필터 지우기
필터 지우기

How to get 2D view of an ellipsoid?

조회 수: 9 (최근 30일)
Salar
Salar 2016년 3월 10일
댓글: Salar 2016년 3월 10일
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!

채택된 답변

Ced
Ced 2016년 3월 10일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by