Using Matlab to solve a problem which has linear objective function and many nonlinear constraints, I am trying to generate the inequality nonlinear constraints by a function and pass it to fmincon solver via nonlcon option. My question is if there are no equality nonlinear constraints in the model what should the constraints generator pass to fmincon? I tried the following:
function [c, ceq] = consgenerator(x) c = @(x) *[some constraints]*; ceq = ; end
In another attempt, I tried:
ceq = @(x) ;
I got errors in both trials and couldn’t find an example of passing many nonlinear inequality constraints into fmincon.