gfft.m
来自「自编的一些小波源程序,用MATLAB编的.希望对那些喜欢小波的人有所帮助.去解压」· M 代码 · 共 18 行
M
18 行
% Function to Compute a DFT Sample
% Using Goertzel's Algorithm
% XF = gfft(x,N,k)
% x is the input sequence of length <= N
% N is the DFT length
% k is the specified bin number
% XF is the desired DFT sample
%
function XF = gfft(x,N,k)
if length(x) < N
xe = [x zeros(1,N-length(x))];
else
xe = x;
end
x1 = [xe 0];
d1 = 2*cos(2*pi*k/N);W = exp(-i*2*pi*k/N);
y = filter(1,[1 -d1 1],x1);
XF = y(N+1) - W*y(N);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?