Skip to content
Snippets Groups Projects
Commit 9fb6f52f authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Add log option to plot_iir_filter_analysis()

parent f5310b94
No related branches found
No related tags found
1 merge request!374Add plot_iir_filter_analysis() based on LTF-IIR-allgemein.ipynbcode from...
......@@ -339,7 +339,7 @@ def plot_time_response(h, name='', markers=False):
plt.grid(True)
def plot_iir_filter_analysis(b, a, fs=1, whole=False, Ntime=100, step=False, show=[]):
def plot_iir_filter_analysis(b, a, fs=1, whole=False, Ntime=100, step=False, log=False, show=[]):
"""Plot and print iir filter analysis results.
Input:
......@@ -362,6 +362,8 @@ def plot_iir_filter_analysis(b, a, fs=1, whole=False, Ntime=100, step=False, sho
z, p, k = dsp_fpga_lib.zplane(b, a, plt_ax=ax1) # uses np.roots(a), np.roots(b)
else:
z, p, k = dsp_fpga_lib.zplane(b, a) # no plot, only calculate z, p, k
if log:
print('Zeros, poles and gain from b, a coefficients:')
if len(z) > 0:
print('. zeros:')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment