X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=optimization%2Ftest_functions%2Frosenbrock_hessian1.m;fp=optimization%2Ftest_functions%2Frosenbrock_hessian1.m;h=63a105f9757cd204dccc900cce5a4647240e9a36;hp=0000000000000000000000000000000000000000;hb=75563505172dce2cc78116f0884819ca32620dbe;hpb=1e0c72bb336872f0839305340eb9699a87a40319 diff --git a/optimization/test_functions/rosenbrock_hessian1.m b/optimization/test_functions/rosenbrock_hessian1.m new file mode 100644 index 0000000..63a105f --- /dev/null +++ b/optimization/test_functions/rosenbrock_hessian1.m @@ -0,0 +1,12 @@ +function H = rosenbrock_hessian1(x) + ## + ## A version of the rosenbrock_hessian() function which takes a column + ## 2-vector instead of two distinct arguments. See rosenbrock_hessian.m + ## for more information. + ## + if (length(x) == 2) + H = rosenbrock_hessian(x(1), x(2)); + else + H = NA; + end +end