]> gitweb.michael.orlitzky.com - octave.git/blob - tests/random_orthogonal_matrix_tests.m
Add the random_orthogonal_matrix() function and its tests.
[octave.git] / tests / random_orthogonal_matrix_tests.m
1 for n = [ 1, 10, 25, 50, 100 ]
2 U = random_orthogonal_matrix(n);
3 actual = norm(U);
4 expected = 1;
5
6 msg = sprintf('random_orthogonal_matrix(%d) has norm 1', n);
7 unit_test_equals(msg, expected, actual);
8 end