Converting a matrix of other forms into one simple matrix - help

조회 수: 4 (최근 30일)
Itachi
Itachi 2012년 9월 11일
Hi guys, I have 4x36x4 matrix and I wanted to make it into 16x36 matrix, is there anyway to do that?
Best regards, Ayubirad

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 9월 11일
편집: Andrei Bobrov 2012년 9월 11일
please read about the function reshape
A = randi(456,4,36,4); % Let the initial array
out = reshape(A,16,[]);
ADD (please read about the function permute)
out = reshape(reshape(A,size(A,1),[])',size(A,2),[])';
or
out = reshape(permute(A,[2 1 3]),size(A,2),[])';
  댓글 수: 3
Andrei Bobrov
Andrei Bobrov 2012년 9월 11일
please see ADD in my answer

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by