To convert power spectrum to a log-scaled one, how to define
X(k)=0 for some
For sake of illustration, I brief my process as follows which is a convention one:
Calculate the magnitude spectrum
X(k)of the time-domain signal
X(k) = abs(fft(x(n))).
Convert the magnitude spectrum or power spectrum to db by
My problem arises when there is
X(k)=0 when computing
log10(X(k)) which is either not defined or
-inf. How to deal with this?