필터 지우기
필터 지우기

Reshaphing 3D Matrix into 2D Matrix

조회 수: 2 (최근 30일)
Stephan Raczak
Stephan Raczak 2016년 9월 6일
댓글: Stephan Raczak 2016년 9월 7일
I have a 9x256x21 single matrix that I would like to convert into a 2D matrix so that the new dimensions are 9x5376. The 5376 is a multiplication of 256*21. The third dimension (21) each represents 1 second and I just want to concatenate each second columnwise.
I am aware I most likely need to use the reshape function but am unsure how. Please help me! Thanks

채택된 답변

Henry Giddens
Henry Giddens 2016년 9월 6일
편집: Henry Giddens 2016년 9월 6일
Yes reshape will work
sz = size(A);
B = reshape(A,sz(1),[],1);
% or B = reshape(A,sz(1),sz(2)*sz(3));
Henry

추가 답변 (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