Selecting which prominence to use with findpeaks
Hello
I am using findpeaks to find the prominence of my peaks in the attached imaged. However the prominence for peak 4 is instead the entire height of the function. How can I change this to match the other peaks (1,2,3,5) and why is this behaviour happening?
Thanks
HP
Code:
prominance = max(xDose(:,2))/3;
[pks,locs,widths,proms] = findpeaks(xDose(:,2),xDose(:,1),’MinPeakProminence’, prominance);
findpeaks(xDose(:,2),xDose(:,1), ‘MinPeakProminence’, prominance,’Annotate’,’extents’)
text(locs+1,pks,num2str((1:numel(pks))’))Hello
I am using findpeaks to find the prominence of my peaks in the attached imaged. However the prominence for peak 4 is instead the entire height of the function. How can I change this to match the other peaks (1,2,3,5) and why is this behaviour happening?
Thanks
HP
Code:
prominance = max(xDose(:,2))/3;
[pks,locs,widths,proms] = findpeaks(xDose(:,2),xDose(:,1),’MinPeakProminence’, prominance);
findpeaks(xDose(:,2),xDose(:,1), ‘MinPeakProminence’, prominance,’Annotate’,’extents’)
text(locs+1,pks,num2str((1:numel(pks))’)) Hello
I am using findpeaks to find the prominence of my peaks in the attached imaged. However the prominence for peak 4 is instead the entire height of the function. How can I change this to match the other peaks (1,2,3,5) and why is this behaviour happening?
Thanks
HP
Code:
prominance = max(xDose(:,2))/3;
[pks,locs,widths,proms] = findpeaks(xDose(:,2),xDose(:,1),’MinPeakProminence’, prominance);
findpeaks(xDose(:,2),xDose(:,1), ‘MinPeakProminence’, prominance,’Annotate’,’extents’)
text(locs+1,pks,num2str((1:numel(pks))’)) findpeaks, data proccesing, graphs MATLAB Answers — New Questions