0% found this document useful (0 votes)
287 views4 pages

TDM

This document contains MATLAB code that generates a sinusoidal signal and triangular signal, combines them using time division multiplexing (TDM), then separates the signals back out after transmission. It plots the original signals, the TDM signal, and the recovered signals to demonstrate the TDM process.

Uploaded by

Mohit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
287 views4 pages

TDM

This document contains MATLAB code that generates a sinusoidal signal and triangular signal, combines them using time division multiplexing (TDM), then separates the signals back out after transmission. It plots the original signals, the TDM signal, and the recovered signals to demonstrate the TDM process.

Uploaded by

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

%B.

Tech ECE Group-2


% Name: Mohit kumar Roll no.: 1704006
% Name: Munazza Fatma Roll no.: 1704007
% Name: Sachin kumar Roll no.: 1704008
% Name: Saumya Raj Roll no.: 1704009
%--------------------------------------------------------------------------
clc;
close all;
clear all;

x=0:.5:4*pi;
sig1=8*sin(x);
l=length(sig1);
sig2=8*triang(l);

subplot(2,2,1);
plot(sig1);
title('Sinusoidal Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(2,2,2);
plot(sig2);
title('Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');

subplot(2,2,3);
stem(sig1);
title('Sampled Sinusoidal Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(2,2,4);
stem(sig2);
title('Sampled Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
l1=length(sig1);
l2=length(sig2);
for i=1:l1
sig(1,i)=sig1(i);
sig(2,i)=sig2(i);
end

tdmsig=reshape(sig,1,2*l1);

figure
stem(tdmsig);
title('TDM Signal');
ylabel('Amplitude--->');
xlabel('Time--->');

demux=reshape(tdmsig,2,l1);

1
for i=1:l1
sig3(i)=demux(1,i);
sig4(i)=demux(2,i);
end

figure
subplot(2,1,1)
plot(sig3);
title('Recovered Sinusoidal Signal');
ylabel('Amplitude--->');
xlabel('Time--->');
subplot(2,1,2)
plot(sig4);
title('Recovered Triangular Signal');
ylabel('Amplitude--->');
xlabel('Time--->');

2
3
Published with MATLAB® R2016a

You might also like