声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1141|回复: 1

[HHT] 一个关于hht_toolbox_20040808(Huang)的问题啊

[复制链接]
发表于 2012-1-9 13:20 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
求助一下hhtpm.m函数的注释问题啊?
function [h,xs,w] = hhtpm(data,nyy,t0,t1,ni)
%
%   [ht,t,f]=hhtp_m(data,ny,t0,t1,ni):   Hilbert spectrum -- phase-image.
%   ny:   the frequency resolution.
%   t0:
  the true strat time.
%   t1:   the true end time.
%   ni:   vertical smouth points (Ex. ni=5)
%The outputs are:
%   nt:   a 2-D matrix of the hilbert spectrum
%    t:
  the time axis
%    f:   the frequency axis

%NOTE: (1) On the screen it will appear 'max-frequency' and 'min-frequency'
%      (2) contour(t,f,nt) will plot the contour of the hilbert spectrum.

%       Z. SHEN 07-2-1995    Initial
%
  D. Xiang 03-26-2002  Modify
%       At The Johns Hopkins University.

[npt,knb] = size(data);            %read the dimensions
%-----Hilbert Transform --------------------!
dt=(t1-t0)/(npt-1);
data=hilbert(data);
a=angle(exp(j*pi)*data);
omg=diff(data)./data(1:npt-1,:)/(2*pi*dt);

%---- force the negative omg to be zero, DX. ---!
omg=(omg+abs(omg))/2.;
% add the last row to omg so that it has the same dimention
omg=[omg;omg(npt-1,:)];

clear data
%----- get local frequency -----------------!
wmx=max(max(omg))
wmn=min(min(omg))
dw=wmx-wmn;
if wmn<0.
   error('Error: negative frequency appears!');
end
clear p;
%----- Construct the ploting matrix --------!
h1=zeros(npt,nyy+1);
p=round(nyy*(omg-wmn)/dw)+1;

for j1=1:npt
   for i1=1:knb
      ii1=p(j1,i1);

      h1(j1,ii1)=h1(j1,ii1)+a(j1,i1);
      if (ii1 > 1)&(ii1 <= nyy)
         h1(j1,ii1-1)=h1(j1,ii1);

h1(j1,ii1+1)=h1(j1,ii1);
      end
   end
end

%---- the results ------------------!
w=linspace(wmn,wmx,nyy+1)';
xs=linspace(t0,t1,npt)';
h=flipud(rot90(abs(h1)));


(data,nyy,t0,t1,ni)这几个参数怎么设置呢?


回复
分享到:

使用道具 举报

 楼主| 发表于 2012-1-9 13:51 | 显示全部楼层
用过这个工具箱的大虾们指导一下啊 !!!
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-21 18:01 , Processed in 0.051342 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表