Given
vector a = (1:N)'; with N consecutive integershow to generatematrix b = [a a+1 a+2 ... a+M]; with M columns, each column incremented by one.
For example
N = 3; M = 3;a = (1:3)';b = [(1:3)' (2:4)' (3:5)' (4:6)'];
incrementshift
vector a = (1:N)'; with N consecutive integershow to generatematrix b = [a a+1 a+2 ... a+M]; with M columns, each column incremented by one.
N = 3; M = 3;a = (1:3)';b = [(1:3)' (2:4)' (3:5)' (4:6)'];
Best Answer