声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

楼主: a1runner

[HHT] 有关HHT学习遇到的一些问题的解答整理

  [复制链接]
发表于 2012-3-17 21:59 | 显示全部楼层
还是感谢,谢谢!
回复 支持 反对
分享到:

使用道具 举报

发表于 2012-3-18 11:02 | 显示全部楼层
初学EMD 感谢楼主分享!
发表于 2012-3-18 23:42 | 显示全部楼层
发表于 2012-3-19 10:33 | 显示全部楼层
多谢分享 努力学习中
发表于 2012-3-19 10:34 | 显示全部楼层
试下软件~~~~~~~~~~~
发表于 2012-3-24 20:00 | 显示全部楼层
回复 4 # qqzhouqianziyi 的帖子

你好 toimage这个函数是自己编的还是什么工具箱里的函数
发表于 2012-3-26 22:06 | 显示全部楼层
恩恩  不错 学习了
发表于 2012-3-27 16:08 | 显示全部楼层
回复 51 # zxn-0419 的帖子

%TOIMAGE  transforms a spectrum made of 1D functions in an 2D image
%
% [im,tt,ff] = TOIMAGE(A,f,t,splx,sply) transforms a spectrum made
% of 1D functions (e.g., output of "hhspectrum") in an 2D image
%
% inputs :   - A    : amplitudes of modes (1 mode per row of A)
%            - f    : instantaneous frequencies
%            - t    : time instants
%            - splx : number of columns of the output im (time resolution).
%                     If different from length(t), works only for uniform
%                     sampling.
%            - sply : number of rows of the output im (frequency resolution).
% outputs :  - im   : 2D image of the spectrum
%            - tt   : time instants in the image
%            - ff   : centers of the frequency bins
%
% Examples : [im,tt,ff] = toimage(A,f);[im,tt] = toimage(A,f,t);[im,tt,ff] = toimage(A,f,sply);
%            [im,tt,ff] = toimage(A,f,splx,sply);[im,tt,ff] = toimage(A,f,t,splx,sply);
%
%
% See also
%  emd, hhspectrum, disp_hhs
%
% G. Rilling, last modification 3.2007
% gabriel.rilling@ens-lyon.fr

function [im,tt,ff] = toimage(A,f,varargin)


DEFSPL = 400;

error(nargchk(2,5,nargin));

switch nargin
  case 2
    t = 1:size(A,2);
    sply = DEFSPL;
    splx = length(t);
  case 3
    if isscalar(varargin{1})
      t = 1:size(A,2);
      splx = length(t);
      sply = varargin{1};
    else
      t = varargin{1};
      splx = length(t);
      sply = DEFSPL;
    end
  case 4
    if isscalar(varargin{1})
      t = 1:size(A,2);
      sply = varargin{1};
      splx = varargin{2};
    else
      t = varargin{1};
      sply = varargin{2};
      splx = length(t);
    end
  case 5
    t = varargin{1};
    splx = varargin{2};
    sply = varargin{3};
end
if isvector(A)
  A = A(:)';
  f = f(:)';
end


if issparse(A) || ~isreal(A) || length(size(A)) > 2
  error('A argument must be a real matrix')
end
if issparse(f) || ~isreal(f) || length(size(f)) > 2
  error('f argument must be a real matrix')
end
if any(size(f)~=size(A))
  error('A and f matrices must have the same size')
end
if issparse(t) || ~isreal(t) || ~isvector(t) || length(t)~=size(A,2)
  error('t argument must be a vector and its length must be the number of columns in A and f inputs')
end
if ~isscalar(splx) || ~isreal(splx) || splx ~= floor(splx) || splx <= 0
  error('splx argument must be a positive integer')
end
if ~isscalar(sply) || ~isreal(sply) || sply ~= floor(sply) || sply <= 0
  error('splx argument must be a positive integer')
end

if any(diff(diff(t))) && splx ~= length(t)
  warning('toimage:nonuniformtimeinsants','When splx differs from length(t), the function only works for equally spaced time instants. You may consider reformating your data (using e.g. interpolation) before using toimage.')
end

f = min(f,0.5);
f = max(f,0);

indf = round(2*f*(sply-1)+1);
indt = repmat(round(linspace(1,length(t),splx)),size(A,1),1);
im = accumarray([indf(:),indt(:)],A(:),[sply,splx]);

indt = indt(1,:);
tt = t(indt);
ff = (0:sply-1)*0.5/sply+1/(4*sply);

end

评分

1

查看全部评分

发表于 2012-3-28 17:40 | 显示全部楼层
感谢楼主无私奉献
发表于 2012-4-4 19:16 | 显示全部楼层
楼主辛苦了  新人学习
发表于 2012-4-20 14:51 | 显示全部楼层
我也下载下来好好学习下啊,谢谢楼主啊
发表于 2012-4-20 21:05 | 显示全部楼层
学习学习
发表于 2012-4-25 21:54 | 显示全部楼层
请问楼主,EMD函数不用自己定义吗?我运行了一下,发现还是得定义EMD啊,不然根本出来不了图的
发表于 2012-4-26 08:38 | 显示全部楼层
楼主英明啊
发表于 2012-5-9 10:42 | 显示全部楼层
新手,过来学习学习
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-4-28 21:16 , Processed in 0.126041 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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