MATLAB: How to make zero padding

zero padding

can anyone help me to make zero padding for a 4×3 matrix. i have to add a row of zeros in the top,bottom, left and right side of the matrix

Best Answer

If you have the Image Processing Toolbox, you can use padarray().