필터 지우기
필터 지우기

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 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