[問題] Input argument "x" is undefined.(已爬文)已回收
我的CommandWindows是這樣
xlsFile='data61.xls';
t=xlsread(xlsFile,'sheet1','A1:A944')';
J=xlsread(xlsFile,'sheet1','B1:B944')';
T=diag(t);
myfun2
----------myfun2.m的內容為-------------
function F=myfun2(x,t);
A=9.9359E-05;
F=(A*x(2)*exp(x(1)*x(2)*t)*(x(2)+A*(exp(x(1)*x(2)*T)-1))^-1);
x0=[0.01,0.00001];
[x,resnorm]=lsqcurvefit(@myfun2,x0,t,J)
---------------------------------------
結果出現
??? Input argument "x" is undefined.
Error in ==> myfun2 at 3
F=(A*x(2)*exp(x(1)*x(2)*t)*(x(2)+A*(exp(x(1)*x(2)*T)-1))^-1);
請問我該在哪裡定義x!?
或是這樣做哪裡有錯誤
不好意思我是matlab新手
請大家指教
謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.150.220
→
09/27 16:10, , 1F
09/27 16:10, 1F