]> gitweb.michael.orlitzky.com - octave.git/blobdiff - optimization/test_functions/wood_gradient1.m
Replace ##-style comments with %-style comments in all non-test code.
[octave.git] / optimization / test_functions / wood_gradient1.m
index 0191f54bdf7b0c7461ae7238e14e9ae92576ec8e..bfe86f32ffda7576100a85b0d24dcc3b0d20113d 100644 (file)
@@ -1,8 +1,12 @@
 function g = wood_gradient1(x)
-  ##
-  ## A version of the wood_gradient() function which takes a column
-  ## 4-vector instead of four distinct arguments. See wood_gradient.m
-  ## for more information.
-  ##
-  g = wood_gradient(x(1), x(2), x(3), x(4));
+  %
+  % A version of the wood_gradient() function which takes a column
+  % 4-vector instead of four distinct arguments. See wood_gradient.m
+  % for more information.
+  %
+  if (length(x) == 4)
+    g = wood_gradient(x(1), x(2), x(3), x(4));
+  else
+    g = NA;
+  end
 end