matlab拟合gaussian型曲线问题。

请问各位大牛,我有两组实验数据:fI [...]和wI[...],已知该数据符合附图所示公式,公式中Δ1/2,I=500, B=-2.2773请问如何用matlab编程拟合出函数e(w)的曲线出来,求大牛指点,非常感谢!
fi: -0.6114
-16.3008
-6.0663
-1.9747
27.7967
7.4833
-7.2032
1.1680
-6.2338
-18.9908
-60.9910
25.9141
5.5413
14.3570
23.2852
18.2265
-10.4724
97.4887
-33.6204
-9.5943
wI:
-0.6114
-16.3008
-6.0663
-1.9747
27.7967
7.4838
-7.2032
1.168
-6.2338
-18.9908
-60.991
25.9141
5.5413
14.357
.

 Accepted Answer

pipika
pipika on 24 Nov 2022

0 votes

如果直接照着你的公式画图(因为你所有参数都给定了,不存在拟合了),那就是:
fI = [275.01
240.9
233.88
223.35
219.04
211.64
207.6
206.18
196.52
190.21
189.75
188.42
184.69
180.87];
wI = [-0.6114
-16.3008
-6.0663
-1.9747
27.7967
7.4838
-7.2032
1.168
-6.2338
-18.9908
-60.991
25.9141
5.5413
14.357];
d=500;
B=-2.2773;
w = 180:330;
e = sum(diag(fI/d)*exp(B*bsxfun(@minus, w, wI).^2/(d^2)));
plot(w,e)

More Answers (0)

Categories

Tags

Asked:

on 24 Nov 2022

Answered:

on 24 Nov 2022

Community Treasure Hunt

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

Start Hunting!