I have 3 sets of 30 data points X,Y,Z. I would like to make the 4th dimension color. However the 4th dimension I want to use is a different length than my X,Y,Z (133 vs 30).
This is a problem when using the scatter3 function in MATLAB, as the color dimension must match the size of X,Y,Z.
I also want to animate this plot in .avi format, and have the 4th dimension (color) change as the movie progresses.
Thanks in advance.
Create a 2D or 3D matrix to define your colors: 2D if you use colors indexed into the colormap, or 3D if you want to give RGB values.
Edit: note the colormap and axes 'clim' property.