请教matlab高手,线性拟合t=[0 1 2 3 8 10]c=[0 2 3.3 4.6 6.2 6.3]ln(Cs-c)=-Kla*t+b拟合后,把代码发过来,
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 02:05:05
请教matlab高手,线性拟合t=[0 1 2 3 8 10]c=[0 2 3.3 4.6 6.2 6.3]ln(Cs-c)=-Kla*t+b拟合后,把代码发过来,
请教matlab高手,线性拟合
t=[0 1 2 3 8 10]
c=[0 2 3.3 4.6 6.2 6.3]
ln(Cs-c)=-Kla*t+b
拟合后,把代码发过来,
请教matlab高手,线性拟合t=[0 1 2 3 8 10]c=[0 2 3.3 4.6 6.2 6.3]ln(Cs-c)=-Kla*t+b拟合后,把代码发过来,
t=[0 1 2 3 8 10]';
c=[0 2 3.3 4.6 6.2 6.3]';
ft_ = fittype('Cs-exp(-k*t+b)',...
'dependent',{'c'},'independent',{'t'},...
'coefficients',{'Cs', 'k', 'b'});
st=[2 1 1]
[curve, goodness]= fit(t,c,ft_,'Startpoint',st)
figure
plot(curve,'predobs',0.95);
hold on,plot(t,c,'b*')
---------
curve =
General model:
curve(t) = Cs-exp(-k*t+b)
Coefficients (with 95% confidence bounds):
Cs = 6.488 (6.059, 6.917)
k = 0.383 (0.302, 0.4639)
b = 1.876 (1.792, 1.96)
goodness =
sse: 0.0617
rsquare: 0.9980
dfe: 3
adjrsquare: 0.9966
rmse: 0.1434