]> gitweb.michael.orlitzky.com - octave.git/blobdiff - optimization/test_functions/powell_hessian1.m
Add the powell_hessian() and powell_hessian1() functions.
[octave.git] / optimization / test_functions / powell_hessian1.m
diff --git a/optimization/test_functions/powell_hessian1.m b/optimization/test_functions/powell_hessian1.m
new file mode 100644 (file)
index 0000000..b11d7f8
--- /dev/null
@@ -0,0 +1,12 @@
+function H = powell_hessian1(x)
+  ##
+  ## A version of the powell_hessian() function which takes a column
+  ## 4-vector instead of four distinct arguments. See powell_hessian.m
+  ## for more information.
+  ##
+  if (length(x) == 4)
+    H = powell_hessian(x(1), x(2), x(3), x(4));
+  else
+    H = NA;
+  end
+end