Find only peaks of interest

1 visualización (últimos 30 días)
Sriram Guddati
Sriram Guddati el 9 de Mayo de 2019
Respondida: Star Strider el 9 de Mayo de 2019
I need to pick only the periodic peaks. Meaning I want peaks only in the circled region (because they are periodic) or other regions where the peaks are periodic. I don't want to pick any other peaks especially the ones with larger transtions. Can someone help me with this.
Capture.PNG

Respuestas (1)

Star Strider
Star Strider el 9 de Mayo de 2019
Your best option is to use two separate calls to findpeaks with different 'MinPeakHeight' arguments for each. The first one would not have a 'MinPeakHeight' argument at all, and the second would be 0. Then use the setdiff function to retrieve the locations you want.
Example —
locs1 = 1:10; % All Peaks
locs2 = [1:3 7:10]; % Peaks With ‘'MinPeakHeight',0’
locsWanted = setdiff(locs1, locs2); % Desired Peaks
Once you have the ‘locs’, (here ‘locsWanted’)getting the peaks and whatever the independent variable values are for those peaks is just indexing into the various vectors using ‘locsWanted’ as the index. .

Community Treasure Hunt

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

Start Hunting!

Translated by