plot a 3d point in MatLab

2019-01-20 06:08发布

问题:

I'm trying to plot just one point in any coordinate system: Cartesian, cylindrical or spherical.

I tried plot3(1,1,1) with many values but just shows a tiny point in the same location for all values! I tried surf(X,Y,Z) as well but matlab said: Z must be a matrix, not a scalar or vector.

回答1:

How about this?

plot3(1,1,1,'.');
grid on

You did try it, but then again, that is exactly what it does!



回答2:

Something like scatter3(x,y,z1,720,'g','fill') will make opaque green spheres of 720 size around all the points listed in the vectors x,y,z1.