Finding a specific amplitude-frequency in the time domain

1 reply · 2K views · last reply
Behrouz
Messages
21
Reaction score
0
Hello,

I have a signal and got the FFT result of that. I have shown them both below along with the MATLAB code.

May I ask if there is any method to find the time zone(s) in the signal that a specific frequency has(have) happened?

The reason I'm asking this is that I want to specify the time that I had a (specific) low frequency with a (specific) high amplitude.
Code:
%% apply fft on the csv and plot the result

nfft = length(M);

nfft2 = 2^nextpow2(nfft);

ff = fft(M, nfft2);

fff = ff(1:nfft2/2);

stem(abs(fff));

Line plot of a noisy signal: values hover around 25 for the first 2000 samples, dip to about 15 near sample 1650, then rise steadily to about 65 by sample 3700.

MATLAB stem plot of FFT magnitude against frequency-bin index from 0 to about 400, with the largest peaks near 20000 at the lowest indices and amplitudes decaying steeply to near zero by index 400.


Any advice would be greatly appreciatd.

Regards,
Behrouz
 
Attachments
  • MATLAB stem plot of FFT magnitude against frequency-bin index from 0 to about 400, with the largest peaks near 20000 at the lowest indices and amplitudes decaying steeply to near zero by index 400.
    uc?id=1W-38kvWD1hDHxxsU9rRDILzKHH8Wb8bP.png
    15.5 KB · Views: 456
  • Line plot of a noisy signal: values hover around 25 for the first 2000 samples, dip to about 15 near sample 1650, then rise steadily to about 65 by sample 3700.
    uc?id=1Ps_ewvEN6HIb2z9CS7gGiEnNI3GP4mts.png
    13.8 KB · Views: 519