Plotting a 2D matrix
641 views (last 30 days)
Alok Pathak on 27 Jun 2014
I need to plot a matrix M which is 300*42 in size. On the X axis I need to plot 1:42. On the Y Axis I need to plot the value corresponding to the 42 values. On the Z axis I need to plot the 1:300 value.
I tried using the plot3 function in a loop like this and I wouldnt get it right :
for i = 1:300
plot( 1:42, M(i, 1:42), 1:i);
I get the error Vectors are not of similar lengths. Please Help. Many thanks