fftfreq.m
来自「hi i have a huge collection are you int」· M 代码 · 共 18 行
M
18 行
function f = fftfreq(fNyq,Npts)%FFTFREQ To produce a two-sided frequency vector for use with an FFT.%% f = FFTFREQ(fNyq,Npts) fNyq is the Nyquist frequency (half the% sampling frequency) and Npts is the number of points of the% associated FFT. The frequency% extends from -fNyq to fNyq. E.g. try:%% plot(fftfreq(1,N),abs(fftshift(fft(1:N))))%% for N odd and N even.% Andrew Knight, June 1991f = ( -floor(Npts/2) + ((1:Npts)-1) )*2*fNyq/Npts;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?