www.pudn.com > 现代信号处理教程.rar > exa040501f.m


%--------------------------------------------------------------------------------------- 
%  exa040501f.m,  for  example 4.5.1 and fig 4.5.1(f) 
%  三个时频原子的时频分布,图(d)和(e)相乘得该图。 
% 
%  注:在该程序中,用到了子程序 atoms,ambifun.m, 
%      还要用到显示程序 tfrqview及其他程序, 
%      所有这些程序请读者在如下的网站上下载: 
%                      http://crttsn.univ-nantes.fr/~auger/tftb.html 
%      因为该网站上的时频分析软件并没有列入MATLAB的工具箱,涉及到知识产权问题, 
%      因此不能将其列入国内公开出版物上,但读者可以自由下载。 
%---------------------------------------------------------------------------------------- 
clear; 
 
sigma=1.5; 
fs=1/128; 
for t=1:128; 
   for f=1:127; 
      tt=(t-64)*(t-64); 
      f1=(f-64)/128; 
      ff=f1*f1; 
   g(t,f)=exp(-tt*ff/sigma); 
end 
end 
sig=atoms(128,[32,.4,20,1;96,.4,20,1;96,.1,20,1],0); 
[y,t1,t2]=ambifunb(sig); 
x=g.*y; 
t=-63:63; 
f=-0.5+fs:fs:.5; 
 
subplot(211) 
contour(t,f,x,1,'b');grid;