ex8_12.m

来自「Advanced Engineering Mathematics using M」· M 代码 · 共 25 行

M
25
字号
% EX8_12.M Plot the Fourier transform (w>0) of a pulse for various %  widths.  Pulse width is tau = 16 and 4 seconds.f=[0:.005:.75];         % Frequencyf=f + eps;              % Avoid a divide by zeroF1=zeros(size(f));F2=zeros(size(f));F3=zeros(size(f));%tau=16                  % Pulse width in secondsF1=(1/pi)*(sin(pi*f*tau))./f;tau=tau/4;              % Pulse width = 4 secondsF2=(1/pi)*(sin(pi*f*tau))./f;% clf                     % Clear any figuresplot(f,F1,'-',f,F2,'--')title('One-sided spectrum of a pulse - Figure 8.10')xlabel('Frequency in Hertz')ylabel('F(w)')gridlegend('Tau=16','Tau=4')%% Modify the script to allow an arbitrary pulse width to be input.%  Scale the pulses to have the same dc value and compare the%  spectra. 

⌨️ 快捷键说明

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