You are on page 1of 2

NAME : Sagar More REG.

NO: 20201BEC517
Roll NO: A77 SUB : DSP

PRACTICAL No. 2

Aim: To Observe effect of increasing and decreasing the Sampling rate of given
Sequence
x= [3 5 7 8 9]

Code:
clc;
clear all;
close all;

x=[3 5 7 8 9];

subplot(3,1,1);
stem(x);
xlabel('n');
ylabel('x(n)');
title('Orignal
Sequence');

subplot(3,1,2);
y = upsample(x,5);
stem(y);
xlabel('n');
ylabel('y(n)');
title('Up-Sampled Signal');

subplot(3,1,3);
z = decimate(y,2);

stem(z);

xlabel('n');

ylabel('z(n)');

title('Down-sampled Signal')

Output:

You might also like