]> gitweb.michael.orlitzky.com - octave.git/blob - optimization/test_functions/rosenbrock.m
Add the Rosenbrock functions and their tests.
[octave.git] / optimization / test_functions / rosenbrock.m
1 function f = rosenbrock(x1, x2)
2 ##
3 ## The Rosenbrock function. See Dennis & Schnabel, Appendix B, problem #1.
4 ## (The "regular" Rosenbrock function is simply the Extended Rosenbrock
5 ## with m=1).
6 ##
7 ## This function has a minimum at x=(1,1) with f(x) == 0. The
8 ## suggested starting point is x0=(-1.2, 1).
9 ##
10 f = 100*(x2 - x1^2)^2 + (1 - x1)^2;
11 end