필터 지우기
필터 지우기

combine 3x3D into 4D matrix

조회 수: 13 (최근 30일)
Sean Phillips
Sean Phillips 2019년 5월 17일
댓글: Sean Phillips 2019년 5월 17일
I have 3 x 3D Matrixs of size (nrows x nfreqs x time) ie (5000 x 10 x 100)
i want to combine them into a 4D matrix of size (5000 x 3 x 10 x 1000)
ie the 5000 rows of 3D matrix are combined as 3 columns in the 4D matrix

채택된 답변

Walter Roberson
Walter Roberson 2019년 5월 17일
Easiest:
permute(cat(4,M1, M2, M3), [1 4 2 3])
less memory perhaps:
cat(2,reshape(M1, 5000, 1, 10, 100), reshape(M2, 5000, 1, 10, 100), reshape(M3, 5000, 1, 10, 100))
  댓글 수: 1
Sean Phillips
Sean Phillips 2019년 5월 17일
thank you. it works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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