octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49291] residue function gives incompatible re


From: Rik
Subject: [Octave-bug-tracker] [bug #49291] residue function gives incompatible result
Date: Fri, 7 Oct 2016 16:49:42 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #2, bug #49291 (project octave):

As a second example,


b = [2 1 0 0];
a = [1 0 1 1];
[r,p,k] = residue(b,a);
[b2, a2] = residue (r,p,k)
b2 =

 Columns 1 through 3:

   2.00000 + 0.00000i   1.00000 + 0.00000i   0.00000 - 0.00000i

 Column 4:

   0.00000 + 0.00000i

a2 =

   1.00000   0.00000   1.00000   1.00000

imag (b2)

ans =

   0.0000e+00   4.9865e-17  -3.4024e-17   7.3080e-17



As you can see, b2 is nearly equivalent to the starting variable b.  However,
if the code to trim polynomial coefficients was changed to act separately on
the real part and on the imaginary part then these small numbers would be
removed and there would be complete equality.  Perhaps that is an addition to
the code that is worth considering separately from the first issue reported.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49291>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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