[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63440] [octave forge] (signal) sosfilt - NaN
From: |
Charles Praplan |
Subject: |
[Octave-bug-tracker] [bug #63440] [octave forge] (signal) sosfilt - NaN |
Date: |
Wed, 28 Dec 2022 05:57:36 -0500 (EST) |
Follow-up Comment #3, bug #63440 (project octave):
After some further testing, I propose following solution for the function
zp2sos:
Problem:
With current implementation of zp2sos, sos(i, 4) may be zero and this is
unfortunately not supported by the fuction sosfilt.
Solution:
- The real poles and zeros must be combined (as the complex conjugates
ones)
- Leading zeros present in numerator and denominator are removed
[0, 1, 1, 0, 1, 2] -> [1, 1, 0, 1, 2, 0]
Additionally, a bug has been found in
sos2tf:
Problem:
If several trailing zeros were present in numerator and denominator, only
one
of them were removed in numerator (index for A was not incremented)
Correction:
- same index for A as for B (line 87) because index for A was not
incremented
Updated functions and corresponding diff files are appended!
(file #54164, file #54165, file #54166, file #54167)
_______________________________________________________
Additional Item Attachment:
File name: zp2sos.m Size:6 KB
<https://file.savannah.gnu.org/file/zp2sos.m?file_id=54164>
File name: sos2tf.m Size:5 KB
<https://file.savannah.gnu.org/file/sos2tf.m?file_id=54165>
File name: zp2sos.diff Size:1 KB
<https://file.savannah.gnu.org/file/zp2sos.diff?file_id=54166>
File name: sos2tf.diff Size:0 KB
<https://file.savannah.gnu.org/file/sos2tf.diff?file_id=54167>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63440>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/