0

I would like to find periodicity and the oscillation frequency in a signal. I used this simple MATLAB code which works find for some signals, but for a harmonic polluted signal like the one given below it generates wrong results. Is there any way to estimate the frequency of oscillation for a signal like the one given here. I appreciate any MATLAB code snippets.

I wonder if there is a simple way of using fft to estimate the fundamental oscillation frequency or using an FLL frequency estimator.

[pks,pktimes] = findpeaks(x, (1:N)*DT);
Period = mean(diff(pktimes))

enter image description here

user70703
  • 1
  • 1
  • Welcome to SE.SP! This question, or a variant of it, crops up quite a bit. Please have a search for "period" or "periodic" and see if any of those help. If not, please edit your question with what's missing from what you need and I'll reopen for answers. – Peter K. Dec 27 '23 at 19:32
  • Have you tried the methods described in the linked answer (https://dsp.stackexchange.com/questions/15114/cant-find-out-the-period-of-my-signal)? If they do not work, please edit your question to explain how they fail. – MBaz Dec 27 '23 at 22:34

0 Answers0