How to convert matrix to cell array?
4 次查看(过去 30 天)
显示 更早的评论
I have 4*140 double matrix ,and now i want to convert this matrix into 1*35 cell array,in that each cell contains 4*4 double cell
0 个评论
采纳的回答
Bruno Luong
2019-8-11
编辑:Bruno Luong
2019-8-11
c = mat2cell(A,4,4*ones(1,35))
If you want nested cell as well, do that after the above
c = cellfun(@num2cell, c, 'unif', 0)
Be aware, cell is innefficient to work with.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!