how can i organize a column vector in a specific rows?
Show older comments
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
Accepted Answer
More Answers (1)
Image Analyst
on 10 Jun 2022
Edited: Image Analyst
on 10 Jun 2022
v = rand(1536, 1);
m = reshape(v, [], 24) % 24 columns.
v = rand(1530, 1);
m = reshape(v, [], 10) % 10 colums per row
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!