Rearranging rows into columns
40 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Good day everyone,
I have searched forums and I could not find a suitable solution so I come here to post my question. I have a 1x152 array. I would like to turn this into a 8x19 array. Therefore shifting or moving every 19 data inputs into a new row. Here is a smaller example of what I am trying to accomplish
if true
% code
A=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
end
I want to reshape, modify, move (or whatever term you wish to use) matrix A in order to obtain Matrix B which is
if true
% code
B =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
end
Any advice on how to do this would be greatly helpful to me. I will post the answer in my post with pictures in order to help anyone else who might have this issue.
Thank you
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!