How to reshape/permute array correctly?
조회 수: 8 (최근 30일)
이전 댓글 표시
I cannot seem to apply the examples in the 'reshape' documentation and/or the answers given in this forum to this many dimensions.
I have an array of 1440x2x8x703x2 and wish to combine the 1440 and 703 dimensions so that I have: 1012320x2x8x2 instead. Should I use a loop or reshape/permute for this? If someone could explain how to use the latter, I would greatly appreciate it, as the documentation is rather confusing!
댓글 수: 0
채택된 답변
James Tursa
2018년 5월 15일
E.g.,
x = your array
y = permute(x,[1 4 2 3 5]); % Or permute(x,[4 1 2 3 5]) depending on order that you want
result = reshape(y,1012320,2,8,2);
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!