Mercurial > hg > octave-terminal
changeset 12551:e4a1ede4e832
Update test for 'wilkinson(1)' to reflect changes to diag().
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 29 Mar 2011 17:51:38 -0700 |
parents | ea3a4bf39048 |
children | 1cfa3d9adf0a |
files | scripts/ChangeLog scripts/special-matrix/wilkinson.m |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 John W. Eaton <jwe@octave.org> + + * special-matrix/wilkinson.m: Update test for 'wilkinson(1)' to reflect + changes to diag(). + 2011-03-29 Michael Creel <michael.creel@uab.es> * statistics/base/ols.m: Fix erroneous degrees of freedom when
--- a/scripts/special-matrix/wilkinson.m +++ b/scripts/special-matrix/wilkinson.m @@ -35,8 +35,8 @@ print_usage (); endif - if (! (isscalar (n) && (n == fix (n)) && n > 0)) - error ("wilkinson: N must be an integer greater than 0"); + if (! (isscalar (n) && (n == fix (n)) && n >= 0)) + error ("wilkinson: N must be a non-negative integer"); endif side = ones (n-1, 1); @@ -45,7 +45,8 @@ endfunction -%!assert (wilkinson(1), []) +%!assert (wilkinson(0), []) +%!assert (wilkinson(1), 0) %!assert (wilkinson(2), [0.5,1;1,0.5]) %!assert (wilkinson(3), [1,1,0;1,0,1;0,1,1]) %!assert (wilkinson(4), [1.5,1,0,0;1,0.5,1,0;0,1,0.5,1;0,0,1,1.5])