フィルターのクリア

drawing surfaces despite constraints

4 ビュー (過去 30 日間)
asaf omer
asaf omer 2020 年 6 月 21 日
回答済み: Star Strider 2020 年 6 月 21 日
hello ,
how can i draw surfaces such as ellipsoid, sphere?
when i try to split them into 2 functions and draw them together i get the message below:
for example a sphere
x=-3:0.01:3;
y=-3:0.01:3;
[X,Y]=meshgrid(x,y);
Z=sqrt(1-X.^2+Y.^2);
grid on
mesh(X,Y,Z);
i get the message :
Error using mesh (line 71)
X, Y, Z, and C cannot be complex.
how can i draw surfaces like these despite the constraint??

回答 (1 件)

Star Strider
Star Strider 2020 年 6 月 21 日
Experiment with the sphere function.

カテゴリ

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