Skip to content

Commit

Permalink
Tools: Tune: dcblock: Avoid warning about ignoring imaginary
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
singalsu authored and kv2019i committed Sep 14, 2023
1 parent dec770d commit 884bad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tune/dcblock/dcblock_plot_transferfn.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)');
Expand Down

0 comments on commit 884bad4

Please sign in to comment.