octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modified residues() for matlab compatibility


From: Ben Abbott
Subject: Re: modified residues() for matlab compatibility
Date: Sat, 6 Oct 2007 11:26:40 -0400


On Oct 6, 2007, at 8:56 AM, John W. Eaton wrote:

On  6-Oct-2007, John W. Eaton wrote:

| We could also use some tests.  Maybe at least a few simple sanity
| checks plus the example (bug?) that prompted these changes?

Now I see that we have the following test in test_poly (now moved to
residue.m):

  %% test/octave.test/poly/residue-1.m
  %!test
  %! b = [1, 1, 1];
  %! a = [1, -5, 8, -4];
  %! [r, p, k, e] = residue (b, a);
  %! assert((abs (r - [-2; 7; 3]) < 1e-6
  %! && abs (p - [2; 2; 1]) < 1e-7
  %! && isempty (k)
  %! && e == [1; 2; 1]));

But this test is failing because the 4th output "e" is not computed in
your version.  Can we please restore this output?  If it is a
performance problem, then we can compute it only if nargout > 3.

Thanks,

jwe

After reading this a second time, I realized/inferred that Octave allows test code to be embedded in the scripts. I'm happy to include some testing in the new version of residue. Is the generally desirable?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]