我正在尝试使用fit函数来估计4参数模型(P B A R)并在消息后遇到错误,我不知道它是什么意思。
Error using fit>iFit (line 367)
Function value and YDATA sizes are not equal.
Error in fit (line 108)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
基本功能是
function c1 = c1(x,T,P,B,A,R)
if T == 0
c1=0;
else
G = @(t) 0.5*erfc((P./(4*B*R*t)).^0.5.*(B*R*x-t))...
-1/2*(1+P*x+P*t/(B*R))*exp(P*x).*erfc((P./(4*B*R*t)).^0.5.*(B*R*x+t))...
+(P*t/(pi*B*R)).^0.5.*exp(-P*(B*R*x-t).^2./(4*B*R*t)); %first term in the solution
u = @(t) A*t/(B*R);%.
v = @(t) A*(T-t)/(1-B)/R; %.
e = @(t) 2*(u(t.*v(t))).^0.5; %.
H1 = @(t) exp(-u(t)-v(t)).*(besseli(0,e(t))/B+besseli(1,e(t)).*((u(t)./v(t)).^0.5)/(1-B));
GH = @(t) G(t).*H1(t);
c1 = G