I keep getting "not enough input arguments" when trying to fsolve

3 次查看(过去 30 天)
l=5*10^-2;
dab=1*10^-9;
wai=.18;
wastar=.02;
wa=.1;
rhob=1-wa;
rhoa=wa;
rhoai=wai;
rhostar=wastar;
thetastar=(rhoa/rhob-rhostar/rhob)/(rhoai/rhob-rhostar/rhob);
c1=1.2732;
psy1=1.5708;
x=0;
xstar=x/l;
to=0;
funfun=@mhlprob2;
z=fsolve(funfun,to);
function f=mhlprob2(t,c1,psy1,dab,l,xstar,thetastar)
f=c1*exp(-psy1^2*dab*t/l^2)*cos(-psy1*xstar)-thetastar;
end
>> mhlset5prob2
Not enough input arguments.
Error in mhlprob2 (line 2)
f=c1*exp(-psy1^2*dab*t/l^2)*cos(-psy1*xstar)-thetastar;
Error in fsolve (line 242)
fuser = feval(funfcn{3},x,varargin{:});
Error in mhlset5prob2 (line 17)
z=fsolve(funfun,to);
Caused by:
Failure in initial objective function evaluation.
FSOLVE cannot continue.
>> z
Undefined function or variable 'z'.
>>
I want to solve for t but i keep getting this error

采纳的回答

Walter Roberson
Walter Roberson 2020-3-17

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Matrix Inequalities 的更多信息

Translated by