Code covered by the BSD License  

Highlights from
fminconCSD

from fminconCSD by Yi Cao
A wrap of fmincon using complex step differentiation to calculate gradient

mycon(x,a2)
function [c,ceq] = mycon(x,a2)
c = a2/x(1) - x(2);
ceq = x(1)-x(2);

Contact us at files@mathworks.com