function B=zeropad(A,Bsize) B=zeros(Bsize); a=size(A); B(1:a(1),1:a(2))=A(1:a(1),1:a(2));