0% found this document useful (0 votes)
2 views2 pages

Code For Embedded Experiment

Code for embedded experiment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Code For Embedded Experiment

Code for embedded experiment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

clc

clear all
close all
t=0:0.01:0.5;
x=1.5*cos(2*pi*10*t);
y=interp(x,2);
y1=decimate(x,2);
subplot(3,1,1);
stem(x);
xlabel('Discrete time')
ylabel('Ampltude')
title('Input sequence')
subplot(3,1,2);
stem(y);
xlabel('Discrete time')
ylabel('Ampltude')
title('Interpolated output of the input sequence')
subplot(3,1,3);
stem(y1);
xlabel('Discrete time')
ylabel('Ampltude')
title('Decimated output of the input sequnence')
Input sequence
2

Ampltude
0

-1

-2
0 10 20 30 40 50 60
Discrete time
Interpolated output of the input sequence
2

1
Ampltude

-1

-2
0 20 40 60 80 100 120
Discrete time
Decimated output of the input sequnence
2

1
Ampltude

-1

-2
0 5 10 15 20 25 30
Discrete time

You might also like