Skip to content
Snippets Groups Projects
Commit b9b8b761 authored by joemus's avatar joemus
Browse files

pieniä muokkauksia

parent c5c0a4f0
Branches devel
No related tags found
No related merge requests found
% FIR filter coefficients
bk = [0, 0, 2, 0, -1, 0, 2]; bk = [0, 0, 2, 0, -1, 0, 2];
x= @(n) -7*(n-3);
y = conv(bk, x);
figure; % Input signal
stem(x); n = 0:10;
\ No newline at end of file x = 7 * (n - 3 == 0);
% Convolution to calculate output
output = conv(x, bk);
% Plotting
subplot(2,1,1);
stem(n, x);
title('Input Signal');
xlabel('Sample');
ylabel('Amplitude');
subplot(2,1,2);
stem(output);
title('Output Signal');
xlabel('Sample');
ylabel('Amplitude');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment