stuff from 400G analysis (project deliv 01)
This commit is contained in:
22
Functions/showTransferFunction.m
Normal file
22
Functions/showTransferFunction.m
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user