Counting total number of peaks in an array??

I have attached a figure in which i have peaks at certain locations of certain duration.. I need the total number of peaks in the figure. For example, the number of peaks in this figure is 3. Can someone help me??

 Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 20 Ago 2014
Modificato: Azzi Abdelmalek il 20 Ago 2014
numel(findpeaks(your_signal))
%or
numel(gradient(your_signal)==0)

3 Commenti

Thanks!!!! it is working fine..
sorry sir, may i know what is types of the signal for the numel(findpeaks(your_signal)) ? is it .wav file or what ?
Thank you !!!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by