plot 3D and combine in matlab

Posted by George on Stack Overflow See other posts from Stack Overflow or by George
Published on 2011-02-19T19:00:11Z Indexed on 2011/02/19 23:25 UTC
Read the original article Hit count: 274

Filed under:
|
|

Hello ,i have this matrix "experiment=2*rand(npoints,3)-1". I want to plot in in 3D,so i use "mesh(experiment)". How can i take red points in my plot?

Also,i want to implement in the above plot , a sphere with radius 1 at 0,0,0. I did :

mesh(experiment)
hold on
[x,y,z]=sphere;
r=1;
mesh(r*x,r*y,r*z)
hold off

but 1) i am not taking radius 1 2) the figures just showing in the same graph but don't combine

Thanks

© Stack Overflow or respective owner

Related posts about matlab

Related posts about plot