Issue with locating end of poorly defined peak
3 views (last 30 days)
Show older comments
Teshan Rezel on 19 Jun 2022
Commented: Mathieu NOE on 22 Jun 2022
I have several graphs that look similar to the one attached. I am trying to formalise a general approach to finding the location of the start and end of each peak. The start is somewhat easy (using find, and the peak position can be found using max), since the graph starts from 0 (I am interested only in the second entry onwards).
However, the end is really tricky as it never quite gets to zero. I have tried using findpeaks, and also myEnd = find(iso(myPeakLoc:end, 1) > 1e-06); but to no avail.
Can someone advise me on an alternative route please?
tried this - does it help ?
curve = 10; % which curve do you want to plot ?
data = percent_iso(2:end,curve);
% max point
[maxval,maxind] = max(data);
% start point = find first point above 0.1% of max value
[startind] = find(data>0.001*maxval,1,'first');
startval = data(startind);
% stop point= find first point below 0.1% of max value past the peak
[endind] = find(data(maxind:end)<0.001*maxval,1,'first');
endind = endind + maxind;
endval = data(endind);
More Answers (0)
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!