MATLAB: How can i calculate the zero of a sinusoidal irregular function

peakssinusoid

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..

Best Answer

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.