MATLAB: How Can i create 3*3 matrix from 1*3 matrix

image processing

i have b=[1 2 3] and i want b = [1 2 3;0 0 0;0 0 0] how can i add other elments as zeros to make it 3*3 matrix?

Best Answer

[b;zeros(2,numel(b))]