MATLAB: Count oscillations in a signal

oscillationssignal

Hello,
I am interested in counting the number of oscillations in a signal, attached is a example and as you can see there is 3 oscillations, could you please advice how to do that? some ideas or an algorithm?.
In the following link there's a Csv file to use as a test: https://www.dropbox.com/s/cxgn8m6hvkthq1u/decreasingosc.csv?dl=0
And here is a picture: http://i64.tinypic.com/kda809.png

Best Answer

If you have the Signal Processing Toolbox, use the findpeaks function.