I have a signal that I need to analyze and determine the noise. The signal is a collection of 4007 data. I extracted 1 out of the 4007 data and obtained this result:
This is how the FFT looks like with just 1 point of the data. This is the code that I used:
signal = importdata('ascan.txt');Fs = 3490;Fn = Fs/2;L = length(signal); % Signal Length
FTsignal = fft(signal)/L; % Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure(2)plot(Fv, abs(FTsignal(Iv))*2)gridxlabel('frequency (Hz)');ylabel('magnitude');title('FFT of Signal');
I used the Nyquist frequency as I expected the symmetrical shape of the result. However when I input the whole signal into the FFT, I got this 2 result:
This is using Nyquist frequency, Fn.
As you can see, the number of peaks are the same, and they are the same. I am puzzled as I thought the shape should be symmetrical however, I attained this weird result. Do you know why this is the case?
The sampling frequency is 3490Hz and for this single I used this code:
signal = importdata('charlie.txt');Fs = 3490;Fn = Fs/2;L = length(signal); % Signal LengthFTsignal = fft(signal)/L; % Fourier TransformFv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency VectorIv = 1:numel(Fv); % Index Vectorfigure(2)plot(Fv, abs(FTsignal(Iv))*2)gridxlabel('frequency (Hz)');ylabel('magnitude');title('FFT of Signal');
Can anyone point where I went wrong? Thank you for the clarification!
Best Answer