0

I am using fmincon. What I would like to achieve is to give fmincon a function F which receives the point the solver currently found, x and outputs an updated point y, s.t. after every iteration, I can modify the current point the optimization reached (e.g., normalize it to a unit-norm vector) before it continues to the next iteration. Is there some option for achieving that?

olamundo
  • 23,991
  • 34
  • 108
  • 149
  • If it is simply normalise, then `fmincon(@(x) x/norm(x),x0,A,b)` would work. Actually changing the point the optimiser is working on will confuse the optimiser, as it is approximating the Hessian matrix at every step – Bob Mortimer Sep 14 '16 at 13:30
  • @BobMortimer I do not think your solution would work; the gradient at x may not be the gardient at x/norm(x) and hence x+grad*t will not produce the correct search direction – olamundo Sep 14 '16 at 13:32
  • The optimiser is minimising `F(x)` and does not know that `F(x)=g(x/||x||)`, so it will calculate the gradient of `F` not `g`. Or am I missing something? – Bob Mortimer Sep 14 '16 at 15:13

0 Answers0