How to properly transpose a matrix

2 vues (au cours des 30 derniers jours)
Brandon Bush
Brandon Bush le 6 Juil 2018
Modifié(e) : Stephen23 le 6 Juil 2018
I have a 1x31 vector array that I would like to transpose into a 31x1 vector. I set:
Array = Array';
However, every time I run the program, it switches between a row vector and a column vector. How can I get it to stay a column vector?

Réponse acceptée

Stephen23
Stephen23 le 6 Juil 2018
Modifié(e) : Stephen23 le 6 Juil 2018
Regardless of the input size, this will give a column vector:
Array = Array(:)

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by