Add diffusion_matrix_sparse() and its tests.
[octave.git] / tests / diffusion_matrix_sparse_tests.m
1 expected_K = [2, -1, 0, 0, -1;
2 -1, 2, -1, 0, 0;
3 0, -1, 2, -1, 0;
4 0, 0, -1, 2, -1;
5 -1, 0, 0, -1, 2];
6
7 actual_K = diffusion_matrix_sparse(5);
8
9 unit_test_equals("diffusion_matrix_sparse(5) looks right", ...
10 true, ...
11 isequal(actual_K, expected_K));