comparison scripts/polynomial/residue.m @ 6968:c8fc3487ed2c

[project @ 2007-10-06 12:57:58 by jwe]
author jwe
date Sat, 06 Oct 2007 12:57:59 +0000
parents 33f20a41aeea
children b75630794a11
comparison
equal deleted inserted replaced
6967:65a28e9de0a5 6968:c8fc3487ed2c
312 312
313 pnum = polyreduce (pnum); 313 pnum = polyreduce (pnum);
314 pden = polyreduce (pden); 314 pden = polyreduce (pden);
315 315
316 endfunction 316 endfunction
317
318 %% test/octave.test/poly/residue-1.m
319 %!test
320 %! b = [1, 1, 1];
321 %! a = [1, -5, 8, -4];
322 %! [r, p, k, e] = residue (b, a);
323 %! assert((abs (r - [-2; 7; 3]) < 1e-6
324 %! && abs (p - [2; 2; 1]) < 1e-7
325 %! && isempty (k)
326 %! && e == [1; 2; 1]));