Clear Filters
Clear Filters

How can i calculate the zero of a sinusoidal irregular function?

3 views (last 30 days)
Hi guys, I'm a newby of Matlab and i'm practising it through necessity, thus the question may sound stupid for those of you expert with this program.. I have a sinusoidal function that is unfortunately not regular, what i mean is that the peaks that it presents are not reached in a steady way, but among the biggest oscillation in which i have to pose my interest, there are many others much more smaller in amplitude that i would like to cut away from the results. I need to isolate the biggest amplitude peaks and leave off the smaller intermediate ones, i have already tried with Excel to elaborate this function but it recognizes not only this "real" peaks, but also the small slight oscillation that the function does to reach the bigger tops. I am lost completely so anyone that has even a tiny idea of how to go through this issue please let me know. Dunno if i have to link some images of the function elaborated with Excel but for clarity i will, right here below. The red dots are the calculated peaks, that for the first part of the function that is regular are rightly found. The problem comes after the vertical bar, where the function becomes unstable in his "growth". Thx so much once again to those who will help..

Accepted Answer

Star Strider
Star Strider on 24 Aug 2015
I’m only imagining the figure, the red dots, and the vertical bar, since it hasn’t appeared yet. However, if you have the Signal Processing Toolbox, use the findpeaks function. It has enough options in its ‘Name-Value Pair’ arguments to do almost anything you want.
  3 Comments
Star Strider
Star Strider on 24 Aug 2015
My pleasure.
Now that I see the figure, findpeaks should work.
The signal appears to have a relatively constant frequency, so if you want to fit it to a sine curve and estimate its parameters (other than the amplitude variation), Curve Fitting to a Sinusoidal Function will allow you to do that.
Another option to get the signal characteristics is the fft function.
Muthu Annamalai
Muthu Annamalai on 24 Aug 2015
An off the cuff guess would be the signal is amplitude-modulated by a sinusoid of low frequency; so using a sufficient cut-off high-pass filter may do the trick.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!