I have a column vector of 3861 x 1 having some numeric values. I want to convert this vector into matrix of dimension 40 x 100 in matlab.The code must fill the first 40 values in one column and then move to next column. Can anyone help me out??
Share
You can use the reshape function in matlab to rearrange the elements in a matrix. But you can do so only if the number of elements dont change. So if you have a matrix of 4000×1, you can change it to 40×100 using reshape. So, i guess the ideal way would be to pad your 3861×1 matrix with zeros(or whatever you want to pad it with) to a 4000×1 matrix and then reshape it.
See this: