how can i organize a column vector in a specific rows?
Afficher commentaires plus anciens
I have a column vector of 1536 x 1, since I can order it in a row every 24 parts, I will make an example with a smaller vector.
1
two
3
4
5
6
7
8
9
10
it should stay like this.
1 2 3 4 5
6 7 8 9 10
but in the case of the original vector it would have to order in the following way.
1 to 24 in a row
25 to 48 in a row
....
1512 to 1536
any help would help a lot thank you very much
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 10 Juin 2022
Modifié(e) : Image Analyst
le 10 Juin 2022
v = rand(1536, 1);
m = reshape(v, [], 24) % 24 columns.
v = rand(1530, 1);
m = reshape(v, [], 10) % 10 colums per row
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!