Implementation of Decimation / Interpolation Process with Waveforms

By
Advertisement
clc;
clear all;
close all;
t=0:0.01:1;
d=input('enter number D/I');
x=sin(2*pi*5*t);
y=decimate(x,d);
subplot(3,1,1);
stem(x(1:25));
title('original input signal');
xlabel('samples');
ylabel('amplitude');
subplot(3,1,2);
stem(y);
title('decimated output');
xlabel('samples');
ylabel('amplitude');
y1=interp(y,d);
subplot(3,1,3);
stem(y1(1:25));
title('interpolation output');
xlabel('samples');
ylabel('amplitude');


0 comments:

Post a Comment