18 lines
355 B
Matlab
18 lines
355 B
Matlab
|
|
|
|
% Define the filter taps
|
|
h_ = {[1],[1 1],[1 2 1],[1 3 3 1]};
|
|
|
|
for i = 1:length(h_)
|
|
h = h_{i};
|
|
|
|
[H, w] = freqz(h, 1, 1024, 1);
|
|
|
|
figure(1);
|
|
hold on
|
|
plot(w, 10*log10(abs(H)), 'LineWidth', 2,'DisplayName',['$(1+D)^2$']); %todo
|
|
xlabel('Normalized Frequency');
|
|
ylabel('Amplitude in dB');
|
|
grid on;
|
|
ylim([-20,10])
|
|
end |