Lorentzian fit for defined peak

31 次查看(过去 30 天)
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!

采纳的回答

Star Strider
Star Strider 2023-10-3
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 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Estimation 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by