新手救助:请问哪位大虾可以帮我看下这段程序哪里出错了,谢谢!
M文件:
function y=example3(x,a)
y=a(1)*(1-exp(-a(2)*x));
命令:
>> xdata=[0.02 0.02 0.06 0.06 0.11 0.11 0.22 0.22 0.56 0.56 1.10 1.10];
>> ydata=[76 47 97 107 123 139 159 152 191 201 207 200];
>> a0=[192.1 11.38];
>> for i=1:50
a=lsqcurvefit('example3',a0,xdata,ydata)
a0=a;
end
??? Error using ==> lsqcurvefit at 253
Function value and YDATA sizes are incommensurate.