fig4_13.m

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

M
24
字号
% Produces Figure 4.13
%
% demonstrates the relationship between the 
%   Fourier Series and the Fourier Transform
%
T = input('Input T ')
w0 = 2*pi/T;
%  plot for frequencies -30 to 30
N = 30/w0;
c0 = 1/T;
k=1:N;
ck = [sin(k*pi/T)/pi./k];
w = [w0*k 0 -w0*k];
Tck = T*abs([ck c0 ck]);
clf
subplot(211),stem(w,Tck)
%  The plot in the text was generated using stem(w/pi,Tcn)
%     and the pi's along the x axis were added by hand.  
%     The x label was also added by hand.     
axis([-30 30 0 1.25])
title(['Figure 4.13, T = ',num2str(T)])
ylabel('T|ck|')
xlabel('Frequency (rad/sec)')
subplot(111)

⌨️ 快捷键说明

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