Mercurial > hg > octave-nkf
diff scripts/polynomial/polyreduce.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | cadc73247d65 |
line wrap: on
line diff
--- a/scripts/polynomial/polyreduce.m +++ b/scripts/polynomial/polyreduce.m @@ -56,3 +56,14 @@ endif endfunction + +%!assert(all (all (polyreduce ([0, 0, 1, 2, 3]) == [1, 2, 3]))); + +%!assert(all (all (polyreduce ([1, 2, 3, 0, 0]) == [1, 2, 3, 0, 0]))); + +%!assert(all (all (polyreduce ([1, 0, 3]) == [1, 0, 3]))); + +%!assert(isempty (polyreduce ([]))); + +%!error polyreduce ([1, 2; 3, 4]); +