convert a cell array to 3-d array

조회 수: 5 (최근 30일)
Xingang Bu
Xingang Bu 2020년 5월 19일
댓글: Xingang Bu 2020년 5월 19일
Hi,
I have a cell A, the size is : 100*1, for each cell contail an image, the size is 1500*1500. I would like to convert the cell A to a 3 dimensional array B(100,1500,1500).
I don't want to use loop, it there good method? thank you very much!
Peter

채택된 답변

Stephen23
Stephen23 2020년 5월 19일
B = permute(cat(3,A{:}),[3,1,2])
  댓글 수: 1
Xingang Bu
Xingang Bu 2020년 5월 19일
Thank you very much, your answer is great!
I tried cat before ,but failed due to wrong parameter.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by