MATLAB 4D (3d + color) plot with animation
问题 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. 回答1: Create a 2D or 3D matrix to define your colors: 2D if you use colors