transform a 3d matrix into cell array

조회 수: 6 (최근 30일)
Ano
Ano 2017년 6월 9일
편집: Andrei Bobrov 2017년 6월 9일
hello I would like to transform m by n by k matrix into cell array as k by 1 where each cell contain m by n matrix, how can I do it ?? I have tried the following code but I get a 1X1 cell
Mycell= mat2cell(Mymatrix, m , n,ones(k,1));

채택된 답변

Andrei Bobrov
Andrei Bobrov 2017년 6월 9일
편집: Andrei Bobrov 2017년 6월 9일
Mycell = num2cell(Mymatrix,[1 2])
or
Mycell = squeeze(num2cell(Mymatrix,[1 2]))

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