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

5 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 17 Mär. 2020

Weitere Antworten (0)

Kategorien

Mehr zu Linear Matrix Inequalities finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by