MATLAB: How to create a Looped Colum Matrix

columnlooprepeat

Hi, I want to create a column matrix that contains numbers from 0 to 1 (in intervals of 1/1440) 365 times. For example ( create a matrix from 1 to 3, 2 times) would be: A = [1;2;3;1;2;3]. Thank you!

Best Answer

V = linspace(0,1,1441);
V = repmat(V(:),365,1);
The simpler example:
V = [1;2;3];
V = repmat(V(:),2,1);