Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个1x101D 向量A=1:10;,我想将它转换为5x22D 向量,有没有我可以使用的函数,例如:
1x10
A=1:10;
5x2
2dA = 1Dto2D(A,5,2);
我得到
2dA = [ 1 2 3 4 5 6 7 8 9 10]
是的,您正在寻找该reshape功能。它的工作原理与您所描述的完全一样。
reshape