sdr.plot.zeros_poles(b: ArrayLike, a: ArrayLike = 1, **kwargs)

Plots the zeros and poles of the filter.

Parameters:
b: ArrayLike

The feedforward coefficients \(b_i\).

a: ArrayLike = 1

The feedback coefficients \(a_j\). For FIR filters, this is set to 1.

**kwargs

Additional keyword arguments to pass to matplotlib.pyplot.plot().

See also

sdr.FIR, sdr.IIR

Examples

See the FIR filters example.

In [1]: h_srrc = sdr.root_raised_cosine(0.5, 10, 10)

In [2]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.zeros_poles(h_srrc); \
   ...: plt.show()
   ...: 
../../_images/sdr_plot_zeros_poles_1.png

See the IIR filters example.

In [3]: zero = 0.6; \
   ...: pole = 0.8 * np.exp(1j * np.pi / 8); \
   ...: iir = sdr.IIR.ZerosPoles([zero], [pole, pole.conj()])
   ...: 

In [4]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.zeros_poles(iir.b_taps, iir.a_taps); \
   ...: plt.show()
   ...: 
../../_images/sdr_plot_zeros_poles_2.png