how to plot ellipsoid in 3d not in the center

2 visualizaciones (últimos 30 días)
imola
imola el 12 de Sept. de 2014
Respondida: Youssef Khmou el 14 de Sept. de 2014
Dear all,
I want to plot ellipsoid in 3dim not in the origin, what I should use , mesh or surf or plot3.
regards
  1 comentario
Geoff Hayes
Geoff Hayes el 14 de Sept. de 2014
Imola - what information do you have for the ellipsoid? Have you considered using ellipsoid?

Iniciar sesión para comentar.

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 14 de Sept. de 2014
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');

Categorías

Más información sobre Surface and Mesh 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