PROGRAM:
clc;
clf;
clear;
Fs = 100;
t = (0:2*Fs+1)'/Fs;
Fc = 25;
x = sin(2*pi*t);
ydouble = ammod(x,Fc,Fs);
ysingle = ssbmod(x,Fc,Fs);
subplot(2,2,1);
plot(t,x);
title('Modulating signal');
subplot(2,2,2);
plot(t,ydouble);
title('Double sideband amplitude modulation');
subplot(2,2,3);
plot(t,ysingle);
title('Single sideband amplitude modulation');
subplot(2,2,4);
plot(2*pi*t*Fc,abs(fft(ydouble)),2*pi*t*Fc,abs(fft(ysingle)));
title('Frequency plot');
PLOT:
clc;
clf;
clear;
Fs = 100;
t = (0:2*Fs+1)'/Fs;
Fc = 25;
x = sin(2*pi*t);
ydouble = ammod(x,Fc,Fs);
ysingle = ssbmod(x,Fc,Fs);
subplot(2,2,1);
plot(t,x);
title('Modulating signal');
subplot(2,2,2);
plot(t,ydouble);
title('Double sideband amplitude modulation');
subplot(2,2,3);
plot(t,ysingle);
title('Single sideband amplitude modulation');
subplot(2,2,4);
plot(2*pi*t*Fc,abs(fft(ydouble)),2*pi*t*Fc,abs(fft(ysingle)));
title('Frequency plot');
PLOT:
No comments:
Post a Comment