
%% Disceret Time Modulation
% EX 1 X[n]
clc
close all 
clear all 
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (211)
stem (n1,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')
clc
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (212)
stem (-n1,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')
 
clc
close all
clear all 
%%X[n-2]
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (211)
stem (n1,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')
clc
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (212)
stem (n1+2,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')
 
clc
close all
clear al
%%X[2n]
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (211)
stem (n1,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')
n1=-5:1:4;
Y1=[0 -1 -0.5 0.5 1 1 1 1 0.5 0];
subplot (212)
stem (n1/2,Y1);
grid on
xlabel ('Time')
ylabel('Amplitude')
title('Disceret Time Signal')


