My Hessian is a function of two vectors: the target vector and another vector.
The input arguments of the Hessian function are only two, the target vector
and the Lagrange multipliers, that is
function h = hessmgrp(y,lambda)
Then, I have to pass the extra parameter to this function. I read the optim toolbox manual and found different solutions. Eventually, the only way I found is to define global variables and use them locally. It is not the best solution, as remarked in the manual.
Does anybody of you know how to pass extra parameters to
the Hessian function in a more appropriate way?
Thanks in advance
Marco
Anonymous function. Specify your Hessian function as @(y, lambda)
hessmgrp(y, lambda, whateverOtherParametersYouWant) [as long as
whateverOtherParametersYouWant are defined before you create this anonymous
function handle.]
--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
"Steven Lord" <sl...@mathworks.com> wrote in message <ho664c$rjl$1...@fred.mathworks.com>...
Thanks again!!!