Suppose I have a dataset which consists of three vectors which represent a trajectory in 3D. This temporal data can be plotted in Matlab with the following command: plot3(Data(:,1),Data(:,2),Data(:,3),'.r');
The output is a "cloud" of points:
I would like to visualize the trajectory, so my question is: How do I modify the plot so that the color of the points represent the index (time) of the temporal data? Just to make my point a bit clearer, imagine a trajectory of points that change color "smoothly" from red to blue in a way that will enable me to visualize the trajectory.