How do I create a 50x3 cell array from a 50x3 matrix. Keep just getting a 1x1 cell array with a 50x3 submatrix?

孤街浪徒 提交于 2019-12-02 13:30:29

问题


Using this code but it keeps just giving me a 1x1 cell array

mynewcellarray = mat2cell(oldmatrix, 50, 3)

回答1:


You should use num2cell:

mynewcellarray=num2cell(oldmatrix)


来源:https://stackoverflow.com/questions/21336105/how-do-i-create-a-50x3-cell-array-from-a-50x3-matrix-keep-just-getting-a-1x1-ce

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!