MATLAB: How to zero pad in frequency domain

mat

how to zero-pad in frequency domain?

Best Answer

You zeropad a matrix of frequency spectrum the same way you would zeropad any matrix. For example, if your frequency matrix is m*n and you want to add two rows of zeros at the top and bottom, you simply do:
x=zeros(2,n);
zeropaddedmatrix=[x;matrix;x];
which will result in
000000
000000
matrix
000000
000000
Now, how to zeropad a frequency spectrum is a different question and depends on the particular application, that is, how you want to alter your frequency spectrum.
Related Question