I have a matrix that is called merged, the matrix is 100 x 2. I want to create a loop that breaks down the matrix into 5 small matrices (20 x 2) and I want to draw these matrices in one figure. I have done that using the below commands but I wonder if I can do that using a loop?
x = merged (1:100,1:2); a = x (1:20,:); b = x (21:40,:); c = x (41:60,:); d = x (61:80,:); e = x (81:100,:); hold on plot (a(:,1),a(:,2)) plot (b(:,1),b(:,2)) plot (c(:,1),c(:,2)) plot (d(:,1),d(:,2)) plot (e(:,1),e(:,2))
Best Answer