Is there a way to use fmincon without function handles?
2 views (last 30 days)
I want to use fmincon as part of an optimization study but I have that inside a MonteCarlo simulation. Using function handles inside a for loop is a pain so I was wondering if there is a way to use fmincon without function handles. Does anyone have any helpful links or a simple example?
Prannay Jain on 2 May 2017
Edited: Stephen23 on 3 May 2017
According to the documentation of fmincon - http://www.mathworks.com/help/optim/ug/fmincon.html, you can also use problem structure,
>> x = fmincon(problem)
But this problem structure will eventually have a function as one of its fields. The definition of fmincon says to find the minimum of constrained nonlinear multivariable function, so you have to use function handler.
Walter Roberson on 3 May 2017
Possibly linprog() or quadprog() or intlinprog() would be of interest to you: they allow minimization specified in terms of matrices.
quadprog() is the only nonlinear minimization that can be specified as matrices in the MATLAB toolboxes.
There is third-party GA toolboxes that specify the problem as arrays.