MATLAB: How to make fft2 surf plot with z axis in dB

dbdecibelsMATLAB

i tried to normalize this matrix with the maximum
and: p=10*log10(p);
but i get mess
how can i avoid that?

Best Answer

Without access to your data, it’s difficult to say. Two possibilities:
First:
p = 10*log10(abs(p));
Second:
p = 10*log10(abs(p)+1E-2);