I am trying to solve a non-convex optimization problem using
At each iteration, I am iteratively looking for the optimum value and when the termination criterion is satisfied, I keep this value as an initial value for
fmincon() and run the code for the second iteration.
The problem is the code is running fine for the first to third iteration and then I get the following error
Error using sqpInterface Finite difference derivatives at initial point contain Inf or NaN values. Fmincon cannot continue.
Error in fmincon (line 823) [X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = sqpInterface(funfcn,X,full(A),full(B),full(Aeq),full(Beq), .
How can I get rid of this error?