필터 지우기
필터 지우기

creating 2D matrid from 3D matrix

조회 수: 2 (최근 30일)
Bibek
Bibek 2011년 12월 22일
I have a matrix F of size 201*3*201. I want to create another matrix Z of size 40401*3. I can do this as: Z=[F(:,:,1);F(:,:,2);......F(:,:,201)]; But how can I do this more quickly using loop or by any other tricks?

채택된 답변

Walter Roberson
Walter Roberson 2011년 12월 22일
Z = reshape( permute(F, [1 3 2]), [], 3);
  댓글 수: 1
Bibek
Bibek 2011년 12월 23일
Thanks for your input. It worked for me exactly in the way I wish

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by