X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=optimization%2Ftest_functions%2Frosenbrock.m;fp=optimization%2Ftest_functions%2Frosenbrock.m;h=8073a0ae10adfe92ff703abc25abbed24567de97;hb=75563505172dce2cc78116f0884819ca32620dbe;hp=0000000000000000000000000000000000000000;hpb=1e0c72bb336872f0839305340eb9699a87a40319;p=octave.git diff --git a/optimization/test_functions/rosenbrock.m b/optimization/test_functions/rosenbrock.m new file mode 100644 index 0000000..8073a0a --- /dev/null +++ b/optimization/test_functions/rosenbrock.m @@ -0,0 +1,11 @@ +function f = rosenbrock(x1, x2) + ## + ## The Rosenbrock function. See Dennis & Schnabel, Appendix B, problem #1. + ## (The "regular" Rosenbrock function is simply the Extended Rosenbrock + ## with m=1). + ## + ## This function has a minimum at x=(1,1) with f(x) == 0. The + ## suggested starting point is x0=(-1.2, 1). + ## + f = 100*(x2 - x1^2)^2 + (1 - x1)^2; +end