poles
Builtin index · Signal processing
result = poles(filt)
Input: filt · Output: result
What it is
filt: a Model (kind "filter").
Overloads
2 forms. Each carries its own inputs, outputs and worked example — pick the tab for the one you are calling.
| Code | Input | Output | Description |
result = poles(filt) | filt Modelnot documented yet | result CVec | Returns each biquad section's z^2 + a1*z + a2 = 0 roots as a CVec — genuine, generally complex, poles. |
Examples
Written for this form and run by the build -- the output below is what the engine actually produced.
fs = 1000
iir = butter(2, "low", 100, fs)
print("IIR poles: {poles(iir)}")
# IIR poles: [0.57149 + 0.293599i, 0.57149 - 0.293599i]
IIR poles: [0.57149 + 0.293599j, 0.57149 - 0.293599j]
| Code | Input | Output | Description |
result = poles(filt) | filt Modelnot documented yet | result vector or CVec | An FIR filter has no feedback at all, so every pole sits at the origin regardless of the design — the same fact is_stable's "an FIR filter is always stable" relies on. |
Examples
Written for this form and run by the build -- the output below is what the engine actually produced.
fs = 1000
fir = fir1(6, 100, kind="low", fs=fs)
print("FIR poles: {poles(fir)}")
# FIR poles: [0, 0, 0, 0, 0, 0]
FIR poles: [0, 0, 0, 0, 0, 0]
How it works
poles(filt) — for an IIR (sos) filter, each biquad section's z^2 + a1*z + a2 = 0 roots; for an FIR (b) filter, all poles sit at the origin (no feedback at all — see numeric::filter::fir_poles's doc comment for the exact convention). Collected across sections/taps into one CVec.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.