lab 01 309 last one
1
clc; clear all; t_step=0.0001; t_end=0.1; t=0:t_step:t_end; x=(sin(20*pi*t)+sin(100*pi*t)+sin(200*pi*t)); subplot(3,1,1) plot(t,x,'.'), grid on xlabel('Figure 1:x(t)=sin(20*pi*t+30)') %code for sampling fs=500; ts=1/fs; t1=0:ts:t_end; x1=(sin(20*pi*t1)+sin(100*pi*t1)+sin(200*pi*t1)); subplot(3,1,2) stem(t1,x1), grid on %interpolation(reconstruction of analog signal) y=interp1(t1,x1,t); plot(t,y),grid on
-
Upload
bappy-ahmed -
Category
Documents
-
view
213 -
download
1
description
ewu lab 01 309
Transcript of lab 01 309 last one
clc;
clear all;
t_step=0.0001;
t_end=0.1;
t=0:t_step:t_end;
x=(sin(20*pi*t)+sin(100*pi*t)+sin(200*pi*t));
subplot(3,1,1)
plot(t,x,'.'), grid on
xlabel('Figure 1:x(t)=sin(20*pi*t+30)')
%code for sampling
fs=500;
ts=1/fs;
t1=0:ts:t_end;
x1=(sin(20*pi*t1)+sin(100*pi*t1)+sin(200*pi*t1));
subplot(3,1,2)
stem(t1,x1), grid on
%interpolation(reconstruction of analog signal)
y=interp1(t1,x1,t);
plot(t,y),grid on