]> gitweb.michael.orlitzky.com - octave.git/blob - optimization/test_functions/wood.m
3e11a40f0f915c88f52da01637c638e6dbdbfd7e
[octave.git] / optimization / test_functions / wood.m
1 function f = wood(x1, x2, x3, x4)
2 ##
3 ## The Wood function. See Dennis & Schnabel, Appendix B, problem #5.
4 ## This function has a global minimum at x=(1,1,1,1) with f(x) == 0.
5 ## The suggested starting point is x0=(-3, -1, -3, -1).
6 ##
7 f = 100*(x1^2 - x2)^2 + (x1 - 1)^2 + (x3 - 1)^2;
8 f = f + 90*(x3^2 - x4)^2;
9 f = f + 10.1*((x2 - 1)^2 + (x4 - 1)^2);
10 f = f + 19.8*(x2 - 1)*(x4 - 1);
11 end