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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -