hhspectrum.m

来自「主要是希尔伯特——黄HHT中的EMD分解过程的工具箱」· M 代码 · 共 56 行

M
56
字号
function [A,f,tt] = hhspectrum(imf,t,l,aff)% [A,f,tt] = HHSPECTRUM(imf,t,l,aff) computes the Hilbert-Huang spectrum%% inputs:% 	- imf : matrix with one IMF per row%   - t   : time instants%   - l   : estimation parameter for instfreq%   - aff : if 1, displays the computation evolution%% outputs:%   - A   : amplitudes of IMF rows%   - f   : instantaneous frequencies%   - tt  : truncated time instants%% calls:%   - hilbert  : computes the analytic signal%   - instfreq : computes the instantaneous frequencyif nargin < 2  t=1:size(imf,2);endif nargin < 3  l=1;endif nargin < 4  aff = 0;endlt=length(t);tt=t((l+1):(lt-l));for i=1:(size(imf,1)-1) % This is the original statement %     for i=1:(size(imf,1)) % I modify this only to veryfy if the HHT spectrum is caculated from the imfs exclucding the residual  an(i,:)=hilbert(imf(i,:)')';  f(i,:)=instfreq(an(i,:)',tt,l)';  A=abs(an(:,l+1:end-l));  if aff    disp(['mode ',int2str(i),' trait?'])  endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?