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

myfun0(x,a1)
function f = myfun0(x,a1)
f = x(1)^2 + a1*x(2)^2;

Contact us at files@mathworks.com