]> gitweb.michael.orlitzky.com - octave.git/blobdiff - optimization/test_functions/powell1.m
Add powell(), powell1() and their tests.
[octave.git] / optimization / test_functions / powell1.m
diff --git a/optimization/test_functions/powell1.m b/optimization/test_functions/powell1.m
new file mode 100644 (file)
index 0000000..b5e1771
--- /dev/null
@@ -0,0 +1,11 @@
+function f = powell1(x)
+  ##
+  ## A version of the Powell function which takes a column 4-vector as
+  ## an argument instead of four distinct arguments.
+  ##
+  if (length(x) == 4)
+    f = powell(x(1), x(2), x(3), x(4));
+  else
+    f = NA;
+  end
+end