Reshape multidimensional arrays - interpretation
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a 5D array (X) with the following variables: A, B, C, D and E each having lengths 10, 4, 2, 1000 and 20.
I have reshaped X as following: X2 = reshape(X,[],1000,20). When I run size(X2), I get 80 1000 20, which I understand. However, when I plot X2(1,:,1) how should the plot be interpret? Is X2(1,:,1) equal to (A1,B1,C1) and X2(2,:,1) equal to (A2,B1,C1) or am I wrong?
Thanks!
댓글 수: 0
채택된 답변
Walter Roberson
2019년 11월 11일
First column of first plane
A1B1C1D1E1
A2B1C1D1E1
A3B1C1D1E1
A4B1C1D1E1
...
A10B1C1D1E1
A1B2C1D1E1
A2B2C1D1E1
A3B2C1D1E1
A4B2C1D1E1
...
A10B2C1D1E1
A1B3C1D1E1
A2B3C1D1E1
A3B3C1D1E1
A4B3C1D1E1
...
A10B3C1D1E1
A1B4C1D1E1
A2B4C1D1E1
A3B4C1D1E1
A4B4C1D1E1
...
A10B4C1D1E1
A1B1C2D1E1
A2B1C2D1E1
A3B1C2D1E1
A4B1C2D1E1
...
A10B1C2D1E1
A1B2C2D1E1
A2B2C2D1E1
A3B2C2D1E1
A4B2C2D1E1
...
A10B2C2D1E1
A1B3C2D1E1
A2B3C2D1E1
A3B3C2D1E1
A4B3C2D1E1
...
A10B3C2D1E1
A1B4C2D1E1
A2B4C2D1E1
A3B4C2D1E1
A4B4C2D1E1
...
A10B4C2D1E1
Second column of first plane: same except with D2 instead of D1.
Third column of first plane: same except with D3 instead of D1
So the first row of the first plane has A1B1C1D1E1 A1B1C1D2E1 A1B1C1D3E1 ... A1B1C1D1000E1
Second row of the first plane has A2B1C1D1E1 A2B1C1D2E1 A2B1C1D3E1 ... A2B1C1D1000E1
which does not disagree with what you wrote.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Christmas / Winter에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!