Code covered by the BSD License  

Highlights from
fminconSym

from fminconSym by Yi Cao
A wrap of fmincon to get gradient

fminconSym_example.m
a1 = 2; a2 = 1.5;
options = optimset('LargeScale','off');
x = fminconSym(@(x)myfun0(x,a1),[1;2],[],[],[],[],[],[],@(x)mycon(x,a2),options);

Contact us at files@mathworks.com