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

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

[Octave-bug-tracker] [bug #60384] Residue Function incorrect results


From: Rik
Subject: [Octave-bug-tracker] [bug #60384] Residue Function incorrect results
Date: Tue, 13 Apr 2021 12:49:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

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

There are two issues here.  The first is rather simple.  The argument 'e' is
an extra Octave-only feature.  It gives information about the multiplicity of
the poles.  The Matlab function of the same name does not have this extra
feature.  The input is not required and the documentation just needs to be
changed to state that this is optional.

The second issue is more substantive.  I've re-written the example and
attached it as tst_residue.m.  The code is


B = [1315.789473684211];
A = [1, 1.100000536842105e+04, 1.703789473684211e+03, 0];

poles1 = roots (A)

[r,p,k,e] = residue (B, A)

[B1, A1] = residue (r, p, k, e)


This vividly illustrates the problem because residue() is not able to
reproduce the input vectors B and A.  It is not just the values, the
dimensions are wrong too.  B is a scalar (1x1) whereas B1 is a vector (2x1).



(file #51257)
    _______________________________________________________

Additional Item Attachment:

File name: tst_residue.m                  Size:0 KB
    <https://file.savannah.gnu.org/file/tst_residue.m?file_id=51257>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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