fmagplot.m
来自「文件中包含"基于计算机的信号处理实践"这本书所有的程序代码,是基于MATLAB环」· M 代码 · 共 24 行
M
24 行
function fmagplot( xa, dt )%FMAGPLOT Plot Fourier Transform (Mag) of "ANALOG" signal%-----% Usage: fmagplot( xa, dt )%% xa : "ANALOG" signal% dt : sampling interval for the simulation of xa(t)%---------------------------------------------------------------% copyright 1994, by C.S. Burrus, J.H. McClellan, A.V. Oppenheim,% T.W. Parks, R.W. Schafer, & H.W. Schussler. For use with the book% "Computer-Based Exercises for Signal Processing Using MATLAB"% (Prentice-Hall, 1994).%---------------------------------------------------------------L = length(xa);Nfft = round( 2 .^ nextpow2(5*L) );Xa = fft(xa, Nfft);range = 0:(Nfft/4);ff = range/Nfft/dt;plot( ff/1000, abs( Xa(1+range) ) )title('CONT-TIME FOURIER TRANSFORM (MAG)')xlabel('FREQUENCY (kHz)'), grid
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?