Find only peaks of interest

조회 수: 1 (최근 30일)
Sriram Guddati
Sriram Guddati 2019년 5월 9일
답변: Star Strider 2019년 5월 9일
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

답변 (1개)

Star Strider
Star Strider 2019년 5월 9일
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. .

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by