Skip to content

Commit 884bad4

Browse files
singalsukv2019i
authored andcommitted
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 <seppo.ingalsuo@linux.intel.com>
1 parent dec770d commit 884bad4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/tune/dcblock/dcblock_plot_transferfn.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
f = linspace(1, fs/2, 500);
99

10-
semilogx(f, 20*log10(freqz(b, a, f, fs)));
10+
semilogx(f, 20*log10(abs(freqz(b, a, f, fs))));
1111
grid on
1212
xlabel('Frequency (Hz)');
1313
ylabel('Magnitude (dB)');

0 commit comments

Comments
 (0)