www.pudn.com > 1.rar > ZOOMFFT.m, change:2010-03-11,size:284b


function [Fx,Fy] = ZOOMFFT(x,fs,f1,f2) 
%x时域信号 
%fs采样频率 
%f1细化起始 
%f2细化终止 
%Fx频谱横轴 
%Fy频谱纵轴 
M=length(x); 
w=exp(-j*2*pi*(f2-f1)/(fs*M)); 
a=exp(j*2*pi*f1/fs); 
Fy = czt(x,M,w,a); 
Fy = abs(Fy)/M*2; 
Fx = ((0:length(Fy)-1)'*(f2-f1)/length(Fy)) + f1; 
Fx = Fx';