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

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

[Octave-bug-tracker] [bug #64506] Wrong result for complex FIR part of r


From: Thomas Hoffmann
Subject: [Octave-bug-tracker] [bug #64506] Wrong result for complex FIR part of residuez()
Date: Wed, 2 Aug 2023 14:57:58 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64506>

                 Summary: Wrong result for complex FIR part of residuez()
                   Group: GNU Octave
               Submitter: loeriver
               Submitted: Wed 02 Aug 2023 06:57:56 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.3.0
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 02 Aug 2023 06:57:56 PM UTC By: Thomas Hoffmann <loeriver>
The FIR part of residuez() are conjugate w.r.t. to their true values. 

The only test that shows this (with a non-real result) asserts f wrongly to
-2j: the true result is (+)2j:

%! B=[1,6,6,2]; A=[1,-(2+j),(1+2j),-j];
%! [r,p,f,m] = residuez(B,A);
%.....
%! assert(f,-2j,1E-6);
...

The test case was recalculated manually and with Python's
scipy.signal.residuez: the FIR part comes out as (+)2j.

So the last line of the function

f = conj(fliplr(f));

should read

f = fliplr(f);


This behavior is carried over to residuez() (residuez.R) in R's gsignal
package, BTW. 







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64506>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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