I have a vector with the size (1,9) with the value as follows:
V= [0.5 0.1 0.1 0.9 0.5 0.1 0.9 0.9 0.5]
How can I convert the vector V
into the matrix M
with the size of (3,3) which the first row is the first 3 elements of the vector and the second row contains the next 3 elements of the vector and keeping that rule for all of other elements of the vector as follows:
0.5 0.1 0.1
M= 0.9 0.5 0.1
0.9 0.9 0.5
Also for different sized vectors, like for example (1,100), how can I convert into a matrix of (10,10) base on the rule above?