zp2sos behaviour changed in signal-1.4.3

Hi,

The behaviour of zp2sos changed recently between signal-1.4.2 and
signal-1.4.3. The returned value for a first-order section has been
shifted right.

For signal-1.4.2/inst/zp2sos.m the documentation says:
"The b0 entry must be nonzero for each section." and " @var{A1}.' = [1
a1 a2]}". The example shows
## sos =
## 1.0000 0.6180 1.0000 1.0000 0.6051 0.9587
## 1.0000 -1.6180 1.0000 1.0000 -1.5843 0.9587
## 1.0000 1.0000 0 1.0000 0.9791 0

For signal-1.4.3/inst/zp2sos.m the comment about b0 is removed and
"@var{A1}.' = [a0 a1 a2]}". The example shows:
## sos =
## 1.0000 0.6180 1.0000 1.0000 0.6051 0.9587
## 1.0000 -1.6180 1.0000 1.0000 -1.5843 0.9587
## 0 1.0000 1.0000 0 1.0000 0.9791

If a0 is assumed to be the coefficient of z^0 then this is clearly
incorrect.

Can someone please tell me the reason for this change?

Thanks in advance.

1 Like

According to the logs [3] changes to that function were in bug #51936 [1] and #60597 [2]

[1] GNU Octave - Bugs: bug #51936, [octave forge] (signal) zp2sos… [Savannah]

[2] GNU Octave - Bugs: bug #60597, [octave forge] (signal) Bug in… [Savannah]

[3] Octave Forge / inst/zp2sos.m Commit Log (sourceforge.net)