Rearranging rows into columns
조회 수: 36 (최근 30일)
이전 댓글 표시
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!