Mercurial > hg > octave-nkf
diff scripts/linear-algebra/duplication_matrix.m @ 13286:49ae6f497171
Use common code idiom x == fix (x) to detect integers
* cosd.m, sind.m, tand.m, duplication_matrix.m: Use common code idiom
x == fix (x) to detect integers.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 07 Oct 2011 08:28:00 -0700 |
parents | 0fe1b5d4db56 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/linear-algebra/duplication_matrix.m +++ b/scripts/linear-algebra/duplication_matrix.m @@ -68,7 +68,7 @@ print_usage (); endif - if (! (isscalar (n) && n == round (n) && n > 0)) + if (! (isscalar (n) && n > 0 && n == fix (n))) error ("duplication_matrix: N must be a positive integer"); endif