I'm plotting the FFT power-spectrum of a signal in MATLAB. I uploaded the 8000 samples time-series signal in a text file here: http://wikisend.com/download/896484/signal.txt
I'm using the following code:
Fs = 500; % sampling frequency
L = length(y); %number of samples
complex = fft(y)/L; % complex signals
f = 0 : Fs/L : Fs/2; % frequency bins
amplitude = 2*abs(complex(1:L/2+1)); % amplitudes
pow = (amplitude).^2/2; % power
semilogy(f,pow,'-ro');
grid on;
And I'm having the following plot:
The confusion is, where I work they are using their own modified FFT function and if I run that code I obtain the following plot:
If you check the power in above figures the linear power ratio is 16 between my code and their's. And for other measurement I'm getting the ratio 60, 120 or even 1.
I'm confused and need help if one can plot FFT for me and see if my code and plot correct.