知道函数的初始和目标状态,如何用matlab求解带未知数的系数函数表达式 10
展开全部
您好,t=[0.1,1.1,2.3,3.4,4.5,5.7,6.7]';
y=[0,94.0,84.0,77.0,69.0,62.0,56.0]';
ft_ = fittype('A*exp(-beta*t)*cos(w*t+phi)',...
'dependent',{'y'},'independent',{'t'},...
'coefficients',{'A', 'beta', 'phi', 'w'});
st=[-100 0.01 -pi 5]
[curve, goodness]= fit(t,y,ft_,'Startpoint',st)
figure
plot(curve,'predobs',0.95);
hold on,plot(t,y,'b*')
st =
-100.0000 0.0100 -3.1416 5.0000
curve =
General model:
curve(t) = A*exp(-beta*t)*cos(w*t+phi)
Coefficients (with 95% confidence bounds):
A = -143.8 (-219.6, -68.05)
beta = 0.135 (0.01584, 0.2541)
phi = -2.131 (-2.379, -1.883)
w = 5.394 (5.259, 5.529)
goodness =
sse: 352.1786
rsquare: 0.9377
dfe: 3
adjrsquare: 0.8754
rmse: 10.8348
y=[0,94.0,84.0,77.0,69.0,62.0,56.0]';
ft_ = fittype('A*exp(-beta*t)*cos(w*t+phi)',...
'dependent',{'y'},'independent',{'t'},...
'coefficients',{'A', 'beta', 'phi', 'w'});
st=[-100 0.01 -pi 5]
[curve, goodness]= fit(t,y,ft_,'Startpoint',st)
figure
plot(curve,'predobs',0.95);
hold on,plot(t,y,'b*')
st =
-100.0000 0.0100 -3.1416 5.0000
curve =
General model:
curve(t) = A*exp(-beta*t)*cos(w*t+phi)
Coefficients (with 95% confidence bounds):
A = -143.8 (-219.6, -68.05)
beta = 0.135 (0.01584, 0.2541)
phi = -2.131 (-2.379, -1.883)
w = 5.394 (5.259, 5.529)
goodness =
sse: 352.1786
rsquare: 0.9377
dfe: 3
adjrsquare: 0.8754
rmse: 10.8348
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询