I have two matrices (x and y), both being 13×5. I need to plot all possible combinations of each row of x with each row of y. I have done:
plot(x(1,1:5),y(1:13,1:5))
But I don't want to go one by one:
plot(a(2,1:5),y(1:13,1:5))plot(a(3,1:5),y(1:13,1:5))
etc
Could you help me?
This is the code I've done so far:
b=5c=10x=[b b 0 0 b]y=[0 c c 0 0]xvector=-(6*b):b:6*bxvector=xvector'xcoordinates=xvector+xyvector=-(6*c):c:6*cyvector=yvector'ycoordinates=yvector+yplot(xcoordinates(1,1:5),ycoordinates(1:13,1:5),"Linewidth", 3)hold onplot(xcoordinates(2,1:5),ycoordinates(1:13,1:5),"Linewidth", 3)xlim([-(6*b) 6*b]); ylim([-(6*c), 6*c])
Best Answer