필터 지우기
필터 지우기

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

조회 수: 5 (최근 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 CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by