clc;
clear all;
close all;
fc=100;
fm=fc/10;
fs=100*fc;
ac=1;am=1;
t=0:1/fs:4/fm;
mt=sin(2*pi*30*t)+2*sin(2*pi*60*t)
figure(1)
subplot(5,1,1);plot(t,mt);
xlabel('time period');
ylabel('amplitude');
title('message signal');
stl=ssbmod(mt,fc,fs,0)
subplot(5,1,2);plot(t,stl);
xlabel('time period');
ylabel('amplitude');
title('modulated lower signal');
stu=ssbmod(mt,fc,fs,0,'upper')
subplot(5,1,3);plot(t,stu);
xlabel('time period');
ylabel('amplitude');
title('modulated upper signal');
dtl=ssbdemod(stl,fc,fs)
subplot(5,1,4);plot(t,dtl);
xlabel('time period');
ylabel('amplitude');
title('demodulated lower signal');
dtu=ssbdemod(stu,fc,fs)
subplot(5,1,5);plot(t,dtu);
xlabel('time period');
ylabel('amplitude');
title('demodulated upper signal');
clear all;
close all;
fc=100;
fm=fc/10;
fs=100*fc;
ac=1;am=1;
t=0:1/fs:4/fm;
mt=sin(2*pi*30*t)+2*sin(2*pi*60*t)
figure(1)
subplot(5,1,1);plot(t,mt);
xlabel('time period');
ylabel('amplitude');
title('message signal');
stl=ssbmod(mt,fc,fs,0)
subplot(5,1,2);plot(t,stl);
xlabel('time period');
ylabel('amplitude');
title('modulated lower signal');
stu=ssbmod(mt,fc,fs,0,'upper')
subplot(5,1,3);plot(t,stu);
xlabel('time period');
ylabel('amplitude');
title('modulated upper signal');
dtl=ssbdemod(stl,fc,fs)
subplot(5,1,4);plot(t,dtl);
xlabel('time period');
ylabel('amplitude');
title('demodulated lower signal');
dtu=ssbdemod(stu,fc,fs)
subplot(5,1,5);plot(t,dtu);
xlabel('time period');
ylabel('amplitude');
title('demodulated upper signal');
0 comments:
Post a Comment