Reshaping a square matrix to a vector
Mostra commenti meno recenti
Hi, I need to convert a 10 by 10 matrix into a 100 by 1 matrix by concatenating each column to the bottom of the preceding one. For example:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
into [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]'
I've tried using reshape but I'm not getting what I want... moreover, I'm trying to use a for loop but can't seem to get it right.
Any help is much appreciated.
Thanks!
-E
Risposta accettata
Più risposte (1)
Esteban
il 26 Mar 2012
0 voti
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!