how can i organize a column vector in a specific rows?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
giancarlo maldonado cardenas
le 10 Juin 2022
Modifié(e) : Image Analyst
le 10 Juin 2022
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
0 commentaires
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
0 commentaires
Voir également
Catégories
En savoir plus sur Resizing and Reshaping 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!