fig6_40.m

来自「基于WEB与MATLAB编写的信号处理的源码,书名为"应用WEB和MATLAB的」· M 代码 · 共 20 行

M
20
字号
% Figure 6.40
% gets Fourier transform for PAM signals (shows best with M=4)
% First, run PAM1 and set s1 = s, and T1 = T; 
%   then run PAM2 and set s2 = s and T2 = T.  Now run this.
[S1,w1]=contfft(s1,T1);
 clf
 subplot(221)
 plot(w1,abs(S1));
 title('(a): Square Pulses')
 axis([0 20 0 2.5])
 ylabel('|S|')
 xlabel('Frequency (rad/sec)')
 subplot(222)
 [S2,w2]=contfft(s2,T2);
 plot(w2,abs(S2))
 axis([0 20 0 2.5])
 title('(b): Sinc Pulses')
 ylabel('|S|')
 xlabel('Frequency (rad/sec)')
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?