Mercurial > hg > octave-lyh
diff scripts/linear-algebra/logm.m @ 11472:1740012184f9
Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 21:33:04 -0800 |
parents | 994e2a93a8e2 |
children | ff7e0776ba0f |
line wrap: on
line diff
--- a/scripts/linear-algebra/logm.m +++ b/scripts/linear-algebra/logm.m @@ -46,7 +46,7 @@ endif if (! issquare (A)) - error ("logm: argument must be a square matrix"); + error ("logm: A must be a square matrix"); endif [u, s] = schur (A); @@ -139,8 +139,8 @@ %!assert(norm(logm([1 -1;0 1]) - [0 -1; 0 0]) < 1e-5); %!assert(norm(expm(logm([-1 2 ; 4 -1])) - [-1 2 ; 4 -1]) < 1e-5); %!assert(logm([1 -1 -1;0 1 -1; 0 0 1]), [0 -1 -1.5; 0 0 -1; 0 0 0], 1e-5); -%! + %% Test input validation %!error logm (); %!error logm (1, 2, 3); -%!error <logm: argument must be a square matrix> logm([1 0;0 1; 2 2]); +%!error <logm: A must be a square matrix> logm([1 0;0 1; 2 2]);