I recently visited this page in order to determine the frequency from signal data in MATLAB:
Determine frequency from signal data in MATLAB
And in this page, an answerer responded with the following code:
[maxValue,indexMax] = max(abs(fft(signal-mean(signal))));
From what I can see, a Fast Fourier Transform is taken on a signal named signal
, its magnitude is kept by using 'abs', and the max value is computed. The max value will be in maxValue
, and the indexMax
will contain the position of the maxValue
. However, can someone explain what is meant by signal-mean
, and what the purpose of it?