Fmincon Error Message please help!

2 visualizaciones (últimos 30 días)
Lori
Lori el 7 de Ag. de 2022
Respondida: Walter Roberson el 8 de Ag. de 2022
When I try to run
pO = [5350 535 1000 1200 0.00002 30 100 0.912 500 15 120000 800000 0.00004 2.5 0.009263 4.3 1 0.01 0.076 15 0.01 1.27 0.001 0.5 10 18 1.09 0.002 0.001];
lb = [1000 100 500 600 0.00001 20 50 0.5 200 10 100000 500000 0.00001 1.5 0.005263 1.43 0.5 0.008 0.03 5 0.0006 0.5 0.0008 0.3 8 15 1 0.001 0.0008];
ub = [53500 5350 5000 2000 0.00005 100 300 1.5 1000 30 400000 10000000 0.00008 5 0.02 10 2 0.05 0.1 40 0.05 2.7 0.002 1 12 20 1.11 0.005 0.005];
p = fmincon(@Obj_Complex,pO,[],[],[],[],lb,ub);
it gives me this error
Error in fmincon (line 568)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in Fancy (line 8)
p = fmincon(@Obj_Complex,pO,[],[],[],[],lb,ub);
Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.
  1 comentario
Steven Lord
Steven Lord el 7 de Ag. de 2022
Since the error occurs in your objective function, without seeing the code of Obj_Complex it will be impossible to offer any specific guidance.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 8 de Ag. de 2022
In order to get that error at that line of code, your function Obj_Complex had to have generated an error message when evaluated passing in p0. You can see the error by executing
Obj_Complex(p0)

Categorías

Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by