Not enough input arguments in function with fsolve

조회 수: 10 (최근 30일)
Ece Balkan
Ece Balkan 2016년 7월 20일
편집: Matt J 2016년 7월 20일
I can not figure out what causes this error in this function. Any help will be appreciated. Thanks!
function gx = gx_fermi(y,t1,t2 )
options=optimset('Display','iter');
gx=fsolve(@(t1,t2,y)[0 t1 6*(y^(1/2)) 0]*(t2-t1),[t1,t2,y],options);
% disp(gx);
gx=reshape(gx,[2,2]);
end
  댓글 수: 1
Matt J
Matt J 2016년 7월 20일
편집: Matt J 2016년 7월 20일
The problem you are solving with fsolve looks highly degenerate. There is a continuum of solutions over the sets of points {t1=t2} and over {t1=y=0}.

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2016년 7월 20일
편집: Matt J 2016년 7월 20일
fun = @(x) [0 x(1) 6*(x(3)^(1/2)) 0]*(x(2)-x(1));
gx=fsolve(fun ,[t1,t2,y],options);

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by