필터 지우기
필터 지우기

how to plot ellipsoid in 3d not in the center

조회 수: 3 (최근 30일)
imola
imola 2014년 9월 12일
답변: Youssef Khmou 2014년 9월 14일
Dear all,
I want to plot ellipsoid in 3dim not in the origin, what I should use , mesh or surf or plot3.
regards
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2014년 9월 14일
Imola - what information do you have for the ellipsoid? Have you considered using ellipsoid?

댓글을 달려면 로그인하십시오.

답변 (1개)

Youssef  Khmou
Youssef Khmou 2014년 9월 14일
For surface representation, you can use meshgrid to generate the ellipsoid with parameterization :
a=5;
b=3;
c=1;
[u,v]=meshgrid(-pi/2:0.1:pi/2,linspace(-pi,pi,length(u)));
x=a*cos(u).*cos(v);
y=b*cos(u).*sin(v);
z=c*sin(u);
figure; surf(x,y,z);
title(' Ellipsoid');

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by