recently I was using patternsearch to minimize a function. I set the lower bound to lb = [1e-6 -1e6] and the upper bound to ub = [1e-1 -1e4].
However, during the run, an error came out saying
"Error using barrier
Objective function is undefined at initial point. Fmincon cannot continue.
Error in fmincon (line 797)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
Error in globalsearchnlp
Clearly, the examination point lead to the error exceed the lower bound I set. I don't know why this happens and if there is any way to avoid it.