fsolve error: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.

조회 수: 9 (최근 30일)
Can someone help me fix my function here? The error message I am getting is as above. My input is : c2=roots([1,-2*b2*cos(A2*pi/180),b2^2-b1^2-c1^2+2*b1*c1*cos(A1*pi/180)]);
for n=1:numel(c2)
if c2(n)>0 c2(n) end end %%
A1=120; A2=100; b1=180; b2=165; c1=115;
type quadrat
c2 = fsolve (@quadrat,100)
Still very new to Matlab, so it may be a very basic error. I can also give the whole problem if needed
Full error message: Error using feval
Attempt to execute SCRIPT quadrat as a function: C:\Users\mcange3\Documents\MATLAB\quadrat.m
Error in fsolve (line 219) fuser = feval(funfcn{3},x,varargin{:});
Error in quadrat (line 15)
c2 = fsolve (@quadrat,100)
Caused by: Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by