MATLAB: 3D line plot

3d plots

How to generate a 3D line plot? I know how to generate 3D surface plot using mesh,surf,etc. But instead of surface, i want line plot. for example, I have a set of data, i want to plot the data against time stamp and variables. I tried using plot3, but this function require the inputs to have same dimension. Can anyone help me with this, please?

Best Answer

If you want to plot 3D lines, you need to have 3D data, whether the data is the typical x,y,z coordinates or one of the dimension is time.
line() can support (x,y,z) pairs.