nlc_eng
% with the following function non linear constraints can be defined
% the name of the function is nlc_eng (non linear constraints_english)
% the function (m-file) must be saved in the current directory
function [c,ceq]=nlc_eng(x)
% c is the expression of the nonlinear inequality constraints (col vector)
% with more then 1 constraints create a new row with ;
% if the constraint is not present write c=[]
%%c=[];
c=[];
% ceq is the expression of the nonlinear equality constraints (col vector)
% with more then 1 constraint create a new row with ;
% if the constraint is not present write ceq=[]
ceq=[2*x(2)^2+3*x(1)*x(2)-4];
27
aprile
2017