]> gitweb.michael.orlitzky.com - octave.git/blob - tests/powell1_tests.m
Add some step length functions, untested.
[octave.git] / tests / powell1_tests.m
1 ## Test the optimal point.
2
3 unit_test_equals("powell1([0;0;0;0]) == 0", ...
4 0, ...
5 powell1([0;0;0;0]));
6
7 ## It should fail with the wrong number of coordinates.
8 f = powell1([1;2;3]);
9 unit_test_equals("powell1 fails with too few coordinates", ...
10 true, ...
11 isna(f));
12
13 f = powell1([1;2;3;4;5]);
14 unit_test_equals("powell1 fails with too many coordinates", ...
15 true, ...
16 isna(f));