0

I've been using matlab for solving a quadratic optimization problem, using a factor structured hessian, say I have a covariance matrix H and I wrote it as H=A+B*B'.

Then I have a small piece of code to calculate the

hessianf=@f; options = optimset('HessMult', hessianf);
y1 = quadprog(A, r, [], [], [], [], [], [], [], options, B);

with

function H=f(A,x,B) H=A*x+B*(B'*x); end

The above process is just following http://www.mathworks.com/help/toolbox/optim/ug/brn4nlc.html

However, matlab says "H must be specified explicitly for the active-set algorithm: cannot use HessMult option.".

I got very confused at where the problem is. Could anyone give me some suggestion?

Amro
  • 123,847
  • 25
  • 243
  • 454
Jack2019
  • 275
  • 2
  • 10

1 Answers1

0

I think you should use trust-region-reflective algorithm instead of active-set. So add optimset('Algorithm', 'trust-region-reflective') to your options.

ash
  • 101
  • 1
  • 7