How to convert a matrix into a vector
Mostrar comentarios más antiguos
I have a matrix and i need to convert it into a vector. Basically i need to remove the dependency of one parameter.Please see the image file i have attached.
Respuesta aceptada
Más respuestas (1)
M Shujah Islam Sameem
el 5 de En. de 2019
5 votos
%%%% Converting Matix to vector
A = [1 2 3; 4 5 6; 7 8 9] % Example matrix
reshape(A,[],1) % convert matrix to column vector
reshape(A,1,[]) % convert matrix to row vector
Categorías
Más información sobre Mathematics and Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!