Mercurial > hg > octave-nkf
comparison scripts/linear-algebra/commutation_matrix.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 | 3140cb7a05a1 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11471:994e2a93a8e2 | 11472:1740012184f9 |
---|---|
76 | 76 |
77 if (nargin < 1 || nargin > 2) | 77 if (nargin < 1 || nargin > 2) |
78 print_usage (); | 78 print_usage (); |
79 else | 79 else |
80 if (! (isscalar (m) && m == round (m) && m > 0)) | 80 if (! (isscalar (m) && m == round (m) && m > 0)) |
81 error ("commutation_matrix: m must be a positive integer"); | 81 error ("commutation_matrix: M must be a positive integer"); |
82 endif | 82 endif |
83 if (nargin == 1) | 83 if (nargin == 1) |
84 n = m; | 84 n = m; |
85 elseif (! (isscalar (n) && n == round (n) && n > 0)) | 85 elseif (! (isscalar (n) && n == round (n) && n > 0)) |
86 error ("commutation_matrix: n must be a positive integer"); | 86 error ("commutation_matrix: N must be a positive integer"); |
87 endif | 87 endif |
88 endif | 88 endif |
89 | 89 |
90 ## It is clearly possible to make this a LOT faster! | 90 ## It is clearly possible to make this a LOT faster! |
91 k = zeros (m * n, m * n); | 91 k = zeros (m * n, m * n); |