Lorentzian fit for defined peak
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Konstantin Shchukin
am 3 Okt. 2023
Beantwortet: Star Strider
am 3 Okt. 2023
Dear all,
I have the spectrum contained several peaks which I would like to fit with Lorentz distribution. Do you know some easy and elegant ways (probably already included to MATLAB) where I can define maximum (x0,y0) and width of the distribution's bell (in the best case using Live Script) and apply this fit for separate peak. Any sollutions with GUI are highly welcome!
Thank you in advance!
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Okt. 2023
First, locate the peaks using findpeaks or islocalmax to get the peak values (amplitudes) and locations. The findpeaks function also has an option to estimate the widths, and to get FWHM, use the name-value pair 'WidthReference','halfheight' (islocalmax does not have a similar option). Then as far as the fitting goes, iterate over the peakss in a loop to fit each one. I posted a similar solution in How to Extract/Fit bell curves under a time series... and while I can’t find an implementation of the Lorenz distribution, the File Exchange has the cauchy function (that appears to be well-regarded, although I’ve never had the occasion to need it so I have no experience with it).
If your spectrum nas baseline variation you want to eliminate, there are ways to do that as well.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!