Lorentzian fit for defined peak
19 ビュー (過去 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!
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Curve Fitting Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!