In matlab, how to increase the dimension of a matrix? -
i have matrix a=(1 2; 3 4), , want augment a b = (1 2 0; 3 4 0; 0 0 0), can ?
one way is: b = [[a, zeros(2,1)]; zeros(1,3)]
but might clumsy in dynamic process, other ideas ?
b=a b(3,3)=0 matlab fills other elements automatically zeros
Comments
Post a Comment