I would like to use for loop to plot data from matrix A together with the corresponding column of matrix B using sub plot function. Below is my initial code. The problem is that I don't see any thing on the plots. Any help/suggestions would be appreciated.
X=1:1:100;A=randi([1 10],100,3);B=A+2;hold onfor i=1:3 subplot(3,1,i) plot(X,A(i)); plot(X,B(i));end
Best Answer