虽然我的模型数据拟合实验数据结果曲线是拍摄非常高和不匹配与实验时间点,即使在改变乌兰巴托和磅
3视图(30天)
显示旧的评论
%实验数据
t1 = [0 6 12 18 36 48];%的时间点
nfe2 = (0.9 1.57 2.87 3.9 5.16 - 4.25);%的水平的蛋白质
t = 1:1:48;%的仿真时间
%的颂歌方程
ode_eqn = @ (x, t) integrate_a (x, t);%的颂歌方程适合
x0 = (0.04 - 0.055);%初始猜测参数
使用lsqcurvefit %最小二乘曲线拟合
x_fit = lsqcurvefit (ode_eqn x0, t1, nfe2);
disp (“拟合参数使用lsqcurvefit:“)
disp (x_fit)
%使用fmincon非线性规划
选择= optimoptions (“fmincon”,“算法”,“内点”);
x_fit_constrained = fmincon (@ (x)和((ode_eqn (x, t1) - nfe2)。^ 2), x0,[],[],[],[],[0 0],[10 10],[],选项);
disp (“拟合参数使用fmincon:“)
disp (x_fit_constrained)
%绘制结果
t_fit = linspace (max (t1), 49);%的时间点绘制拟合曲线
图;
情节(t1, nfe2,“波”,“MarkerSize”8“线宽”,1.5);%绘制实验数据
持有在;
情节(t_fit ode_eqn (x_fit t_fit),的r -,“线宽”2);使用lsqcurvefit %图拟合曲线
情节(t_fit ode_eqn (x_fit_constrained t_fit),“g——”,“线宽”2);使用fmincon %图拟合曲线
持有从;
传奇(的实验数据,“lsqcurvefit”,“fmincon”);
包含(“时间”);
ylabel (“数据”);
标题(的颂歌方程拟合实验数据);
% %
函数干扰素= integrate_a (x, t)
% nf = (0.9 3.3 - 6.8 5.7 - 4.02);
% f = (100 98.31 35.5 12.85 4.68);
干扰素= 0(大小(t));
为i = 1:元素个数(t)
如果t (i) < 6.48
cd (i) = 1;
其他的
cd (i) = (1 - 0.0683) * exp (-0.0240 * (t (i) - 6.48)) + 0.0683;
结束
c = cd;
如果t(我)< 4
正(我)= 0.9;
其他的
正(我)=正(张)+ (cd (i)。* x (1) - inf(张)。* x (2));
结束
干扰素=正;
结束
结束