
224 CHAPTER 13. PROJECT 4: AM TRANSMITTERS
% Simulation outputs
29 subplot (3 ,1 ,1)
set( gca ,‘FontSize ’, myFontSize)
31 plot( t ∗1000, message)
xlabel (‘time ( ms)’)
33 ylabel (‘message ( V )’)
axis ([0 8 −11])
35
subplot (3 ,1 ,2)
37 set( gca ,‘FontSize ’, myFontSize)
plot( t ∗1000,AM_msg)
39 xlabel (‘time ( ms )’)
ylabel (‘AM signal ( V )’)
41
subplot (3 ,1 ,3)
43 set( gca ,‘FontSize ’, myFontSize)
[ Pam , frequency ]=psd ( AM_msg , Nfft , Fs , blackmanharris ( Nfft ));
45 plot( frequency/1000, 10∗log10 ( Pam ))
xlabel (‘frequency ( kHz )’)
47 ylabel (‘spectrum ( dB )’)
set( gca ,‘XTick ’ , [0 4 8 12 16 20 24])
49 set( gca ,‘XTickLabel ’ , [0 4 8 12 16 20