フィルターのクリア

Lorentzian fit for defined peak

41 ビュー (過去 30 日間)
Konstantin Shchukin
Konstantin Shchukin 2023 年 10 月 3 日
回答済み: Star Strider 2023 年 10 月 3 日
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!

回答 (1 件)

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.

カテゴリ

Help Center および File ExchangeSignal Processing Toolbox についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by