Hi,
I want to reshape a vector of length L in a matrix of size [mxp] where m*p == L is not true always. Example: A is given and I want matrix B to be something as given below
A = [1 2 3 4 5 6 7 8 9 10] B = [1 2 3 4; 2 3 4 5; 3 4 5 6; 4 5 6 7; 5 6 7 8; 6 7 8 9; 7 8 9 10]
Is there any possible way to use reshape or any other function to achieve it?
Best Answer