changeset 13047:69a4609e61e2

codesprint: Add a test to orth.m * orth.m : Add a test.
author Carlo de Falco <kingcrimson@tiscali.it>
date Sat, 03 Sep 2011 18:01:46 +0200
parents b2aca5ac54a2
children c5c94b63931f
files scripts/linear-algebra/orth.m
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/linear-algebra/orth.m
+++ b/scripts/linear-algebra/orth.m
@@ -79,3 +79,12 @@
   endif
 
 endfunction
+
+%!test
+%! for ii=1:20
+%!   A = rand (10, 10);
+%!   V = orth (A);
+%!   if (det (A) != 0)
+%!     assert (V'*V, eye (10), 100*eps)
+%!   endif
+%! endfor