I have X-data vector and a matrix of Y-data vectors. I am able to plot the X-data vector versus the columns of the Y-data matrix using the PLOT function as shown below:
var = rand(100,5);var(:,1) = 1:100;plot(var(:,1),var(:,2:5));
However, when I try the same with the SCATTER function as shown below:
scatter(var(:,1),var(:,2:5));
I receive the following error message:
??? Error using ==> scatter at 54 X and Y must be vectors of the same length.
Best Answer