I have an array given by
x = [1 2 3 4];
I would like to create a matrix that looks like
M = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4];
What's the most computationally efficient way to create M from x?
the simple stuff
x = [1 2 3 4];
M = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4];
Best Answer