From 884bad441e4ba282cfab1ce2f2c6cb3ea6d7a2d9 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 29 Aug 2023 18:48:31 +0300 Subject: [PATCH] Tools: Tune: dcblock: Avoid warning about ignoring imaginary The abs() function need to be added to plot the correct magnitude response. Matlab warned in this case about ignoring imaginary part. Signed-off-by: Seppo Ingalsuo --- tools/tune/dcblock/dcblock_plot_transferfn.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tune/dcblock/dcblock_plot_transferfn.m b/tools/tune/dcblock/dcblock_plot_transferfn.m index 8237222014a6..85ef7c079d5e 100644 --- a/tools/tune/dcblock/dcblock_plot_transferfn.m +++ b/tools/tune/dcblock/dcblock_plot_transferfn.m @@ -7,7 +7,7 @@ f = linspace(1, fs/2, 500); -semilogx(f, 20*log10(freqz(b, a, f, fs))); +semilogx(f, 20*log10(abs(freqz(b, a, f, fs)))); grid on xlabel('Frequency (Hz)'); ylabel('Magnitude (dB)');