Add the central_difference function and a test for it.
[octave.git] / tests / central_difference_tests.m
1 xs = [0, 0.5, 1];
2 expected = [-0.5, 0, 0.5];
3 actual = central_difference(xs, 0.5);
4
5 unit_test_equals("Three point central difference works", ...
6 expected, ...
7 actual);