Unfold 3D I x J x K to 2D I x JK

1 回表示 (過去 30 日間)
Maxwell Barton
Maxwell Barton 2019 年 8 月 1 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 1 日
Hi,
I am trying to unfold a matrix in the form I x J x K to I x JK corresponding to I batches, J variables and K time periods (within the batch).
I currently have got this matrix:
And I need it in the form:
batch wise unfold matrix.PNG
How would I go about doing this as I think reshape is inadequate?
Thanks
  1 件のコメント
madhan ravi
madhan ravi 2019 年 8 月 1 日
Illustration with a simple example would be better.

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 1 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 1 日
"I am trying to unfold a matrix in the form I x J x K to I x JK"
May be: Are you looking for this one?
[R C D]=size(M);
X=reshape(M,R,C*D)
I ignored this part "corresponding to I batches, J variables and K time periods (within the batch). "

その他の回答 (1 件)

Bruno Luong
Bruno Luong 2019 年 8 月 1 日
X=M(:,:)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by