悬赏 10 个论坛币 已解决
请教大家,我用matlab建立一个1*30的矩阵,怎么能把它变成3*10的矩阵,要求不改变顺序。例如
a=【1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0】
变换为b=【1,2,3,4,5,6,7,8,9,0
1,2,3,4,5,6,7,8,9,0
1,2,3,4,5,6,7,8,9,0】
用什么函数啊?当然我做的矩阵没有这么简单。
最佳答案
luckyart 查看完整内容
楼主看看用matlab reshape 函数。
B = reshape(A,m,n)
returns the m-by-n matrix B whose elements are taken column-wise from A. An error results if A does not have m*n elements.