0% found this document useful (0 votes)
20 views1 page

Modulation

Modulation scheme

Uploaded by

Sarthak Girhotra
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)
20 views1 page

Modulation

Modulation scheme

Uploaded by

Sarthak Girhotra
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/ 1

clc;

clear all;
close all;

b=0;
fc= 0.05;
n= [0:0.3:20];
delta= 0.01;
x_n= sin(2*pi*fc*n);
for i= 1:length(n)
t= (x_n(i)-b);
y= sign(t);
if y==1
y_n(i+1) =x_n(i)+delta;
b= y_n(i+1);
else
y_n(i+1)= x_n(i)-delta;
b= y_n(i+1);
end
end
ffttx= fft(x_n);
ffttx_a= abs(ffttx);
ffty= fft(y_n);
ffty_a= abs(ffty);

%figure(1)
plot (fftshift(ffttx_a),'g');
hold on
plot (fftshift(ffty_a),'b');
title('Spectra');
xlabel('-----------f--------->');
ylabel('-----------X(f)/Y(f)------>');
legend('Original Signal','Modulated Signal'
);

%figure(2)
plot(n,x_n,'g');
hold on
n1= [0 n];
stairs(n1,y_n,'b')
title('Signals');
xlabel('-----------t/n--------->');
ylabel('-----------x(t)/y[n]------>');
legend('Original Signal','Modulated Signal');
legend('Original Signal','Modulated Signal');

You might also like