1 ## The gradient should be zero at the optimal point.
4 x = repmat([0;0;0;0], m, 1);
6 msg = sprintf("extended_powell_gradient1([0;0;0;0;...]) == 0 (m = %d)", m);
7 unit_test_equals(msg, 0, extended_powell_gradient1(x));
10 ## It should fail with the wrong number of coordinates.
11 g = extended_powell_gradient1([1;2;3]);
12 msg = "extended_powell_gradient1 fails when length(x) is odd";
13 unit_test_equals(msg, true, isna(g));