LoginSignup
1
1

More than 1 year has passed since last update.

gnuplotでガウシアンフィット

Posted at

以下、gnuplot内での記述。

ガウシアン関数の定義

f(x) = a*exp(-(x-b)**2/(2*c**2))+d

データの確認

image.png

いまから、これのx=11付近のピークを読む。

初期値の代入

a=ピーク高さ(y座標)
b=ピーク位置(x座標)
c=ピーク幅
d=バックグラウンド

a=10000;b=10;c=1;d=0

フィッティング

fit [10:12.5] f(x) "mt.txt" u 1:2 via a,b,c,d

フィットパラメータの確認

print a,b,c,d

グラフ描画

plot "mt.txt" w lp, f(x)

image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1