需要注意的是:在重塑矩阵维度的过程中,reshape是以列为操作对象。
例子:
a = [1 2 3
4 5 6
7 8 9
10 11 12]
A=reshape(a,12,1)
A=[1 4 7 2 5 8 3 6 9]
a = [1 2 3
4 5 6
7 8 9
10 11 12]
A=reshape(a,2,2,3)
A1=[1 7
4 10];
A2=[2 8
5 11];
A3=[3 9
6 12] ;