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

1 回表示 (過去 30 日間)
Rodrigo Blas
Rodrigo Blas 2020 年 3 月 17 日
コメント済み: Rodrigo Blas 2020 年 3 月 17 日
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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by