成新的矩阵,则生成四个新矩阵:B1=[3 2 1],B2=[6 5 4],B3=[9 8 7],B4=[1 2 3]。如每行
取四个数则生成二个新矩阵:B1=[3 2 1 6],B2=[9 8 7 1],此时每行多余的后两位数舍去不要。
用matlab编程该如何执行呀?请各位高手不吝赐教!
谢谢4楼的指点,程序运行结果如下:
B =
[1x3 double] [1x3 double] [1x4 double] [1x4 double]
[1x3 double] [1x3 double] [] []
B =
[1x3 double] [1x3 double] [1x4 double] [1x4 double]
[1x3 double] [1x3 double] [] []
B =
[1x3 double] [1x3 double] [1x4 double] [1x4 double]
[1x3 double] [1x3 double] [] []
B =
[1x3 double] [1x3 double] [1x4 double] [1x4 double]
[1x3 double] [1x3 double] [] []
还是没有分开成几个新的矩阵.Workspace显示B为2×4 cell.到底生成几个或若干新矩阵该如何作?还请不吝多多赐教!