MATLAB: Scatter X and Y must be of same length

MATLABscatter

I have a 100×3 array named data that I wanted a scatter plot of
I did Scatter(data,zeros(length(data),3),'bs','filled')
Here X and Y are of same length,but the error states otherwise.
Help please?

Best Answer

Does this do what you want?
data = rand(100,3);
figure(1)
scatter3(data(:,1), data(:,2), data(:,3), 'bs', 'filled')
Replace my data statement with yours so you don’t overwrite it. I created it to test the code.
Related Question