p8_16.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 28 行
M
28 行
% P8_16.M Plot frequency spectrum of clock pulse% The components are 2/(n pi); n odd % Plot 10 components% % Plot a discrete spectrum [f F] by calling CLPTDSCF.M% Input to function is % f - frequencies % F - spectral values% xunit - units of frequency (Hz or rad/sec)%clearxunit='MHz'fdc=4*.05/.125w=2*pi*8*.05/2% Fundamental is 8 MHzf(1)=0.0Fn=zeros(1,6); % Row vector of 6 elements% Compute half spectrum-positive frequenciesfor n=1:6; % Compute 6 positive components f(n+1)=8*n; Fn(n)=((2*fdc)/2)*abs(sin(n*w)/(n*w)); endFn=[fdc Fn]; % Add the zero value%clfclptdscf(f,Fn,xunit)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?