PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Fourier and Laplace 445


ylabel(‘mag[M(w)]’),axis([-7 7 0 11]),
subplot(3,2,3)
fplot(‘cos(50*t)’,[0 0.25 -1.5 1.5]);
ylabel(‘carrier(t)’);
subplot(3,2,4)
w_car=[-50 50];
mag _ car=[pi pi];
stem(w _ car,mag _ car)
ylabel(‘mag[C(w)]’),axis([-60 60 0 4.5])
subplot(3,2,5)
fplot(‘cos(50*t)+3*cos(5*t)’,[0 2 -4.5 4.5]);
ylabel(‘carrier(t)+message(t)’);xlabel(‘time (sec)’)
subplot(3,2,6)
w _ mes _ car=[-50 -5 5 50];
mag _ mes _ car=[pi 3*pi 3*pi pi];
stem(w_mes_car,mag_mes_car)
ylabel(‘mag[M(w)+C(w)]’),axis([-60 60 0 11])
xlabel(‘frequency w (rad/sec)’)
figure(2)
subplot(3,2,1)
fplot(‘3*cos(50*t)*cos(5*t)’,[0 3 -6 6]);
title(‘TME DOMAIN’);
ylabel(‘am-dsb-sc(t)’);
subplot(3,2,2)
w _ AM _ DSB _ SC=[-55 -45 45 55];
mag _ AM _ DSB _ SC=[3/2*pi 3/2*pi 3/2*pi 3/2*pi];
stem(w_AM_DSB_SC,mag_AM_DSB_SC)
title(‘FREQUENCY DOMAIN’)
ylabel(‘mag[AM-DSB-SC(w)]’);
subplot(3,2,3)
fplot(‘cos(50*t)*(5+cos(5*t))’,[0 3 -10 10]);
ylabel(‘am-dsb-wc(t)’);
subplot(3,2,4)
w _ AM _ DSB _ WC=[-55 -50 -45 45 50 55];
mag _ AM _ DSB _ WC=[3/2*pi 5*pi 3/2*pi 3/2*pi 5*pi 3/2*pi];
stem(w_AM_DSB_WC,mag_AM_DSB_WC)
ylabel(‘mag[AM-DSB-SC(w)]’),axis([-60 60 0 5.5*pi]),
subplot(3,2,5)
fplot(‘cos((50*t)+3*cos(5*t))’,[0 2 -2.5 2.5]);
xlabel(‘time (sec)’);
ylabel(‘fm(t)’);
subplot(3,2,6)
w_FM=[-75:5:-25 25:5:75];
mag _ FM=[1.15 1.35 0.970 0.405 0.0615 0 0.0615 0.405 0.970 1.35 1.15 1.15
1.35 0.970 0.405 0.0615 0 0.0615 0.405 0.970 1.35 1.15];
stem(w _ FM,mag _ FM)
ylabel(‘mag[FM(w)]’),axis([-80 80 0 2]),
xlabel(‘frequency w (rad/sec)’)
The script fi le telecom_signals is executed and the results are shown in Figures 4.87 and 4.88.
>> telecom _ signals
********************************************************************
*************************R E S U L T S *******************************
The spectrum of the communication signals are:
*********************************************************************
Free download pdf