X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=optimization%2Ftest_functions%2Fwood1.m;h=c0bfa201df4edded6be7e3e21c0598d523dd8056;hb=HEAD;hp=6c3f31901f542bcb2d827fe98c641ef80d29dcca;hpb=87d434fa93b3e52e8a5a0a9d99ae43492c35e1be;p=octave.git diff --git a/optimization/test_functions/wood1.m b/optimization/test_functions/wood1.m index 6c3f319..c0bfa20 100644 --- a/optimization/test_functions/wood1.m +++ b/optimization/test_functions/wood1.m @@ -1,8 +1,12 @@ function f = wood1(x) - ## - ## A version of the Wood function which takes a column 4-vector - ## instead of four distinct arguments. See wood.m for more - ## information. - ## - f = wood(x(1), x(2), x(3), x(4)); + % + % A version of the Wood function which takes a column 4-vector + % instead of four distinct arguments. See wood.m for more + % information. + % + if (length(x) == 4) + f = wood(x(1), x(2), x(3), x(4)); + else + f = NA; + end end