I am trying to plot a 3D figure defined by z>=0:
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I triY(I),Z(I),'.'); xlabel('X'); ylabel('Y'); zlabel('Z');
Please help me
Answers (1)
Bruno Luong
on 13 Oct 2018
Edited: Bruno Luong
on 13 Oct 2018
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 Comments
Sultan Al-Hammadi
on 13 Oct 2018
Bruno Luong
on 13 Oct 2018
Edited: Bruno Luong
on 13 Oct 2018
Use the mouse turn the object and look from bottom

Sultan Al-Hammadi
on 14 Oct 2018
madhan ravi
on 14 Oct 2018
Accept the answer if it was useful and helpful
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!