22 lines
485 B
Matlab
22 lines
485 B
Matlab
|
|
function showTransferFunction(coeffs,options)
|
|
|
|
arguments
|
|
coeffs
|
|
options.fignum = 765
|
|
options.DisplayName = ''
|
|
options.color = [1 1 0.1]
|
|
end
|
|
% Define the filter taps
|
|
|
|
[H, w] = freqz(coeffs, 1, 1024, 1);
|
|
|
|
figure(options.fignum);
|
|
hold on
|
|
plot(w, 10*log10(abs(H)), 'LineWidth', 2,'DisplayName',options.DisplayName,'Color',options.color); %todo
|
|
xlabel('Normalized Frequency');
|
|
ylabel('Amplitude in dB');
|
|
grid on;
|
|
ylim([-20,10])
|
|
|
|
end |