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

조회 수: 2 (최근 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 CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by