Wednesday 15 January 2014

MATLAB PROGRAM FOR TIME DIVISION MULTIPLEXING

PROGRAM:

clc;
clear all;
close all;
x=1:20;
sig1=sin(x);
l=length(sig1);
sig2=triang(l);
subplot(2,3,1);
plot(sig1,'r');
subplot(2,3,2);
plot(sig2,'g');
subplot(2,3,3);
stem(sig1,'r');
subplot(2,3,4);
stem(sig2,'g');
for i=1:l
    sig(1,i)=sig1(i);
    sig(2,i)=sig2(i);
end
tdmrg=reshape(sig,1,2*l);
subplot(2,3,[5,6]);
stem(tdmrg);

OUTPUT:

No comments:

Post a Comment