Mercurial > hg > octave-max
changeset 7188:fdd7cd70dc14
[project @ 2007-11-26 20:31:25 by jwe]
author | jwe |
---|---|
date | Mon, 26 Nov 2007 20:31:25 +0000 |
parents | 1124c84fc63d |
children | e8d953d03f6a |
files | scripts/polynomial/residue.m |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -378,4 +378,15 @@ %! && abs (kr - k) < 1e-12 %! && abs (er - e(n)) < 1e-12)); - +%!test +%! b = [1]; +%! a = [1, 10, 25]; +%! [r, p, k, e] = residue(b, a); +%! r1 = [0; 1]; +%! p1 = [-5; -5]; +%! assert (abs (r - r1) < 1e-7 && abs (p - p1) < 1e-7 +%! && isempty (k) +%! && e == [1; 2]); +%! [br, ar] = residue (r, p, k); +%! assert ((abs (br - b) < 1e-12 +%! && abs (ar - a) < 1e-12));