Discatenate a column vector to get back to its original square matrix in MATLAB -
i had convert n x n matrix n^2 x 1 column vector ease of operations. now, operations done, how return n x n form n^2 x 1 vector.
it supposed opposite of this: concatenation
thanks!
you can use reshape()
function:
//m n^2 x 1 column vector, nxn matrix want recover = reshape(m, [n n])
if n x n matrix 3x3, then:
a = reshape(m, [3 3])
for more info: http://www.mathworks.com/help/matlab/ref/reshape.html
Comments
Post a Comment