i have worked on optimization problem using command fmincon,and i have to input the analytic gradient of constraint function manually so can we create other function for calling the analytic gradient from other sources?
as we have this problem:
function [c,ceq,DC,DCeq] = confungrad(x)
c(1) = 1.5 + x(1) * x(2) - x(1) - x(2); % Inequality constraints
c(2) = -x(1) * x(2)-10;
% No nonlinear equality constraints
ceq=; % Gradient of the constraints: if nargout > 2
DC= [x(2)-1, -x(2);
DCeq = ;
for the analytic gradient of constraint function DC.so can we call that value from other function without input manually like this?
thank you very much.i am very appreciated for your answers