X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=tests%2Frandom_orthogonal_matrix_tests.m;fp=tests%2Frandom_orthogonal_matrix_tests.m;h=f17e6391eb245355cf81223dbc4ff19358575792;hp=0000000000000000000000000000000000000000;hb=f7394188abd4c5ca3a8e6a74ac16b97a4966df5e;hpb=b1a89e6359bfef7a07ffe49bc703b51ef47574a9 diff --git a/tests/random_orthogonal_matrix_tests.m b/tests/random_orthogonal_matrix_tests.m new file mode 100644 index 0000000..f17e639 --- /dev/null +++ b/tests/random_orthogonal_matrix_tests.m @@ -0,0 +1,8 @@ +for n = [ 1, 10, 25, 50, 100 ] + U = random_orthogonal_matrix(n); + actual = norm(U); + expected = 1; + + msg = sprintf('random_orthogonal_matrix(%d) has norm 1', n); + unit_test_equals(msg, expected, actual); +end