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

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

[Octave-bug-tracker] [bug #51148] residue function potentially inaccurat


From: Rik
Subject: [Octave-bug-tracker] [bug #51148] residue function potentially inaccurate
Date: Thu, 1 Jun 2017 12:46:52 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Update of bug #51148 (project octave):

              Item Group:    Matlab Compatibility => Inaccurate Result      
                  Status:                   Fixed => Confirmed              
             Open/Closed:                  Closed => Open                   
        Operating System:       Microsoft Windows => Any                    
                 Summary: Function that runs in Matlab produces error in
Octave => residue function potentially inaccurate

    _______________________________________________________

Follow-up Comment #10:

Re-titling bug report to reflect what appears to be an underlying problem in
residue.m.  I verified things by changing foster2cauer.m to use the p and q
values calculated by Matlab:


% calculate polynomial coefficients of impedance (numerator and denominator)
%[p,q] = residue(1./cf,-1./(rf.*cf),0);

p = [1.0000e+18   9.0036e+27   1.1290e+36   4.6827e+42];
q = [ 1.0000e+00   1.9231e+15   3.2045e+24   1.3427e+32   2.3274e+38];


With this change, the test case foster2cauer_test runs through to completion.

I stopped the script during execution and have saved the input values to the
residue function in a file residue.var which is attached.  To test things run


load residue.var
[p,q] = residue (r, pin, k)


This has the bad result for p(4) which is in error by 10^5.


(file #40836)
    _______________________________________________________

Additional Item Attachment:

File name: residue.var                    Size:0 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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