You are on page 1of 1

Program 5

SSB SC Modulation and Demodulation


t=0:1000;
fm=0.002;
fc=0.02;
msg=cos(2*pi*fm*t);
car=cos(2*pi*fc*t);
car1=sin(2*pi*fc*t);
Hm=hilbert(msg);
mod=Hm.*car;
op=real(mod);
op2=Hm.*car1;
op3=imag(op2);
mod1=op+op3;
ft=fft(mod1);
demod=op.*car;
[b,a]=fir1(100,0.04);
op1=filter(b,a,demod);
subplot(3,2,1), plot(t,msg);
subplot(3,2,2), plot(t,car);
subplot(3,2,3), plot(t,mod1);
subplot(3,2,4), plot(t,ft);
subplot(3,2,5), plot(t,op1);

You might also like