transform a 3d matrix into cell array

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 日

4 投票

Mycell = num2cell(Mymatrix,[1 2])
or
Mycell = squeeze(num2cell(Mymatrix,[1 2]))

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

Ano
2017 年 6 月 9 日

編集済み:

2017 年 6 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by