From: Matt J on
"Panagiotis " <panos.giannakakis(a)gmail.com> wrote in message <i43h1o$s6l$1(a)fred.mathworks.com>...

> > http://www.mathworks.com/matlabcentral/newsreader/view_thread/269936#707304

>
> How would I then call the "ObjectiveAndConstraints" function with fmincon?
>
> I mean, what would be the syntax of fmincon?
==================


The syntax of fmincon doesn't change. The ObjectiveAndConstraints function just generates the function handles and other arguments that you pass to fmincon. The most general form would be something like this


[fun,A,b,Aeq,beq,lb,ub,nonlcon]=ObjectiveAndConstraints(problemParameters);

x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)