how to convert a matrix to a cell array
168 次查看(过去 30 天)
显示 更早的评论
Hi there,
I have a 2x10 matrix. Would anybody know how I could convert it into a 1x10 cell array - so that each cell contains a 2x1 matrix?
I'm new to matlab and would appreciate any help.
Kind Regards
John
0 个评论
采纳的回答
Andrei Bobrov
2012-7-30
编辑:Andrei Bobrov
2012-7-30
1 个评论
Raphael
2013-5-17
Dear,
Do you know how to save the cell array created by the function?
Best regards,
Raphael
更多回答(1 个)
venkat vasu
2012-7-30
编辑:Walter Roberson
2012-7-30
X= reshape(1:20,2,10)'
C = mat2cell(X, [1,10],[2,1]);
celldisp(C);
另请参阅
类别
在 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!