I would like to count the number of cycles for a specific signal as shown in the below figure.
Thanks in advance.
Best Answer
Use the findpeaks (link) function. Since this appears to be a modulated sine carrier, you might also find the envelope (link) function helpful to recover the modulating signal, then use findpeaks on it as well.
That appears to be a Fourier transform of a noisy signal. If so, because the noise is broadband, a frequency-selective filter of the time-domain signal will not provide an effective solution.
I would use the envelope (link) function on the data you presented, and then identify the peaks of the envelope. You will have to experiment with it to get the resolution you want.
Best Answer