MATLAB: How to find peaks for a graph plotted in semi-log axes and to extract the values of peak and FWHM

findpeakssemilog graphs


Best Answer

  • Use findpeaks with more than 2 outputs:
    [pks,locs,widths,proms] = findpeaks(PeakSig,x);
    See the documentation section on Peak Prominences (link) for details. It specifically describes the ‘widths’ output as ‘Display the prominences and the widths at half prominence of all the peaks.’