tianyeliyu 发表于 2012-6-7 21:02

ST.code中计算高斯窗FFT的一段代码,求解释.

%------------------------------------------------------------------------
function gauss=g_window(length,freq,factor)

% Function to compute the Gaussion window for
% function Stransform. g_window is used by function
% Stransform. Programmed by Eric Tittley
%
%-----Inputs Needed--------------------------
%
% length-the length of the Gaussian window
%
% freq-the frequency at which to evaluate
% the window.
% factor- the window-width factor
%
%-----Outputs Returned--------------------------
%
% gauss-The Gaussian window
%

vector(1,:)=;
vector(2,:)=[-length:-1];
vector=vector.^2;
vector=vector*(-factor*2*pi^2/freq^2);
% Compute the Gaussion window
gauss=sum(exp(vector));

%--------------------------------------------------------------
该函数不是要求exp(-2*pi^2*m^2/n^2)么?为什么这样求:gauss=sum(exp(vector));?
页: [1]
查看完整版本: ST.code中计算高斯窗FFT的一段代码,求解释.