Reshape multidimensional arrays - interpretation

1 回表示 (過去 30 日間)
Uerm
Uerm 2019 年 11 月 11 日
コメント済み: Uerm 2019 年 11 月 11 日
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!

採用された回答

Walter Roberson
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.
  1 件のコメント
Uerm
Uerm 2019 年 11 月 11 日
Thank you very much! Your help is much appreciated!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeChristmas / Winter についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by