fitting a customised guassian equation to the curve

1 回表示 (過去 30 日間)
HYZ
HYZ 2022 年 8 月 25 日
コメント済み: Matt J 2022 年 8 月 25 日
Hi, I have X, Y so I can plot (X,Y).
I have a customised gaussian equation σ ⋅ sqrt(2 * log(2)).
Please suggest how I can write the code to fit the equation to the plot.
Thanks.

採用された回答

Matt J
Matt J 2022 年 8 月 25 日
編集済み: Matt J 2022 年 8 月 25 日
Apply whatever Gaussian fitting routine you usually use to the scaled data (X/sqrt(2*log(2)), Y).
  4 件のコメント
HYZ
HYZ 2022 年 8 月 25 日
編集済み: HYZ 2022 年 8 月 25 日
I didn't explain well. I wanted to get Full Width at half Max (FWFM) using this equation
FWFM = sqrt(2*ln(2))*s; %full width at half maximum; s = standard deviation.
I used fit function to get s but I got c1. which function to get s in matlab so that I can use to get FWFM?
this is my code to get c1. f = fit(x', y', 'gauss1')
Thanks again!
Matt J
Matt J 2022 年 8 月 25 日
The conversion formula is straightforward:
FWHM=2*sqrt(2*log(2))*sigma=2*sqrt(log(2))*c1

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by