我使用 lsqcurvefit 来适应我的功能。我的功能是:
C_PET (t)=(k_1/(α_2+α_1 ) [(k_3+k_4-α_1 ) e^((-α_1 t) )+(α_2-k_3-k_4 ) e^((-α_2 t) ) ]* C_P (t))+vC_b (t)
我去寻找解决方案,这意味着最适合我的 K 参数。问题是我的代码给出的解决方案是起点。这是代码(vb 是常数,cp,ydata,t 是向量
k0 = 1*ones(1,4);
k0(4) = 0;
k0 = [0.8,0.1,0.5,0.07]
a1=[k0(2)+k0(3)+k0(4)+sqrt(((k0(2)+k0(3)+k0(4)).^2) -4*k0(2)*k0(4))]/2;
a2=[k0(2)+k0(3)+k0(4)-sqrt(((k0(2)+k0(3)+k0(4)).^2) -4*k0(2)*k0(4))]/2;
l1=(k0(1)/(a2+a1))*(k0(3)+k0(4)-a1) l2=(a2-k0(3)-k0(4))
l2=(a2-k0(3)-k0(4))
y=conv((l1*exp(-a1*t)+l2*exp(-a2*t)),cp);
y=(y(1:numel(t)));
CPET=@(k,t) y+(vb*cp);
[xfitted,errorfitted] = lsqcurvefit(CPET,k0,t,ydata)
%
所以请你帮帮我。