FUNCTION REFERENCE

zp2sos

Convert zeros, poles and gain into real second-order sections.

Convert zeros, poles and gain into real second-order sections.

Syntax

sos = zp2sos(z, p, k)

Syntax

[sos,g] = zp2sos(z, p, k)

Poles closest to the unit circle are paired first. For each section, the nearest remaining zeros are paired, including conjugates. Sections follow SciPy nearest ordering with the most critical poles last; gain is placed in the first section. Unpaired complex roots are rejected.

Example

sos = zp2sos([], [-1 -2], 1)

Differences from MATLAB: Nearest pairing is supported, so section order can differ. Fewer zeros than poles stay a degree deficit (leading numerator zeros, as in zp2tf), not roots at the origin. Equal zero and pole counts, including an odd-order trailing-zero section, are unchanged.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.