clc;
clear all;
close all;
x=input('enter the sequence');
d=input('enter the decimation factor');
N=length(x);
n=0:N-1;
xd=x(1:d:N);
n1=1:N/d;
subplot(2,1,1);
stem(n,x);
title('input signal');
xlabel('samples');
ylabel('amplitude');
subplot(2,1,2);
stem(n1-1,xd);
title('decimated output');
xlabel('samples');
ylabel('amplitude');
clear all;
close all;
x=input('enter the sequence');
d=input('enter the decimation factor');
N=length(x);
n=0:N-1;
xd=x(1:d:N);
n1=1:N/d;
subplot(2,1,1);
stem(n,x);
title('input signal');
xlabel('samples');
ylabel('amplitude');
subplot(2,1,2);
stem(n1-1,xd);
title('decimated output');
xlabel('samples');
ylabel('amplitude');
0 comments:
Post a Comment