Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

I am trying to plot a 3D figure defined by z>=0:

조회 수: 3 (최근 30일)
Sultan Al-Hammadi
Sultan Al-Hammadi 2018년 10월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
I triY(I),Z(I),'.'); xlabel('X'); ylabel('Y'); zlabel('Z');
Please help me

답변 (1개)

Bruno Luong
Bruno Luong 2018년 10월 13일
편집: Bruno Luong 2018년 10월 13일
x = linspace(-2,2,50);
y = linspace(-2,2,50);
z = linspace(-0.1,2,50);
x = reshape(x,[],1,1);
y = reshape(y,1,[],1);
z = reshape(z,1,1,[]);
R2 = x.^2+y.^2+z.^2;
I = R2>=1 & R2<=4 & z>=0;
isosurface(x,y,z,I,0.5); % 0.5 is middle of 0 and 1
axis equal
  댓글 수: 4
Sultan Al-Hammadi
Sultan Al-Hammadi 2018년 10월 14일
thanks a lot
madhan ravi
madhan ravi 2018년 10월 14일
Accept the answer if it was useful and helpful

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by