Say for example I have
x=[1 2 3 4] y=[1 2 3 4]
and I wanted to create a new vector z which would give all combinations of the elements of x and y. It would look something like
z=[(1,1) (1,2) (1,3) (1,4) (2,1) (2,2) (2,3) (2,4) (3,1) etc etc]. Is this even possible?
Best Answer