MATLAB: Finding time points/intervals when frequency of the signal is about exact value

frequencysignal processingSignal Processing Toolboxtime series

I would like to find at what time frequency of my signal is about 2 Hz. I know how to do fft of my signal but it does not let me find corresponding point in time. Do you have any idea how to do it?

Best Answer

and look at Output Arguments.
Search the normalized frequencies output, w, for the one closest to your target frequency. That gives you a row offset into s. Search that row of s for the maximum absolute value. Index the column number into the time output, t, to get the time of the midpoint of that window.
At least that's what I figure from the documentation.
Related Question