第1个回答 2021-04-14
t=[1,2,3,4,5,6,7,8,9,10];
y=[253.3,251.5,251.2,251,250.9,250.8,250.6,250.6,250.5,250.4];
syms x
f=fittype('c0+c1*exp(-x/a1)+c2*exp(-x/a2)','independent','x','coefficients',{'c0','c1','c2','a1','a2'});
cfun=fit(t',y',f)
cfun =
General model:
cfun(x) = c0+c1*exp(-x/a1)+c2*exp(-x/a2)
Coefficients (with 95% confidence bounds):
c0 = 145.3 (-2.919e+05, 2.922e+05)
c1 = 659 (-1.055e+08, 1.055e+08)
c2 = -552.6 (-1.058e+08, 1.058e+08)
a1 = 42.66 (-7.557e+05, 7.558e+05)
a2 = 35.5 (-5.319e+05, 5.32e+05)