Hi,
I have a signal that shows a very distinctive peaks in the FFT.
Those high amplitudes are the 'noise' of the signal. I would like to remove that values from the original signal and to plot the filtered signal.
Fs = 4500; % Sampling frequency (fps)
T = 1/Fs; % Sampling period (s)
L = 900; % Length of signal (how many frames)
tt = (0:L-1)*T; % Time vector
thickness = detrend(thickness);
Y = fft(thickness);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
figure(1111)
h1=plot(f(1:end),P1(1:end)) ;
title('Amplitude Spectrum')
xlabel('f [Hz]')
ylabel('Power [mm]')
ylim auto
[B,IX] = sort(P1); %order the amplitudes
A1=B(end); %amplitude of the first peak
A2=B(end-1); %amplitude of second peak
f1=f(IX(end)); %frequency of first peak
f2=f(IX(end-1)); %frequency of second peak
AmpTab=[A1 A2];
FreTab=[f1 f2];
0 Comments
Sign in to comment.