3D point or line plot MATLAB plot3 MathWorks
plot3 (X,Y,Z) plots coordinates in 3D space. To plot a set of coordinates connected by line segments, specify X, Y, and Z as vectors of the same length. To plot multiple sets of coordinates on the same set of axes, specify at least one of X, Y, or Z as a matrix and the others as vectors. example