how to plot ellipsoid in 3d not in the center

2 ビュー (過去 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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by