| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 922 人关注过本帖
标题:HILLBERT变换
只看楼主 加入收藏
嘿嘿林
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-5-10
收藏
 问题点数:0 回复次数:4 
HILLBERT变换
小弟在次请教hilbert transformer的源代码,本人实在是无能为力了!
望大家不令赐教!
本人油箱:oulinno1@163.com
QQ:34399520
搜索更多相关主题的帖子: HILLBERT 
2006-05-10 18:23
haichuan
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2006-3-7
收藏
得分:0 
我也想请教,matlab中有hilbert函数,但怎么样才能调出它的源代码呢?请教高手!
2006-05-11 22:18
一只小鱼
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-12-11
收藏
得分:0 

上面两位兄弟的hilbert搞定了吗,搞定了帮我传一份吧。

先谢了

我的邮箱:zuochen1984@126.com

2006-12-11 23:32
hitzhang
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:21
帖 子:369
专家分:52
注 册:2006-9-24
收藏
得分:0 
function x = hilbert(xr,n)
%HILBERT  Discrete-time analytic signal via Hilbert transform.
%   X = HILBERT(Xr) computes the so-called discrete-time analytic signal
%   X = Xr + i*Xi such that Xi is the Hilbert transform of real vector Xr.
%   If the input Xr is complex, then only the real part is used: Xr=real(Xr).
%   If Xr is a matrix, then HILBERT operates along the columns of Xr.
%
%   HILBERT(Xr,N) computes the N-point Hilbert transform.  Xr is padded with 
%   zeros if it has less than N points, and truncated if it has more.  
%
%   For a discrete-time analytic signal X, the last half of fft(X) is zero, 
%   and the first (DC) and center (Nyquist) elements of fft(X) are purely real.
%
%   Example:
%     Xr = [1 2 3 4];
%     X = hilbert(Xr)
%   produces X=[1+1i 2-1i 3-1i 4+1i] such that Xi=imag(X)=[1 -1 -1 1] is the
%   Hilbert transform of Xr, and Xr=real(X)=[1 2 3 4].  Note that the last half
%   of fft(X)=[10 -4+4i -2 0] is zero (in this example, the last half is just
%   the last element).  Also note that the DC and Nyquist elements of fft(X)
%   (10 and -2) are purely real.
%
%   See also FFT, IFFT.

%   Copyright 1988-2001 The MathWorks, Inc.
%   $Revision: 1.9 $  $Date: 2001/04/02 20:21:52 $

%   References:
%     [1] Alan V. Oppenheim and Ronald W. Schafer, Discrete-Time
%     Signal Processing, 2nd ed., Prentice-Hall, Upper Saddle River, 
%     New Jersey, 1998.
%
%     [2] S. Lawrence Marple, Jr., Computing the discrete-time analytic 
%     signal via FFT, IEEE Transactions on Signal Processing, Vol. 47, 
%     No. 9, September 1999, pp.2600--2603.

if nargin<2, n=[]; end
if ~isreal(xr)
  warning('HILBERT ignores imaginary part of input.')
  xr = real(xr);
end
% Work along the first nonsingleton dimension
[xr,nshifts] = shiftdim(xr);
if isempty(n)
  n = size(xr,1);
end
x = fft(xr,n,1); % n-point FFT over columns.
h  = zeros(n,~isempty(x)); % nx1 for nonempty. 0x0 for empty.
if n>0 & 2*fix(n/2)==n
  % even and nonempty
  h([1 n/2+1]) = 1;
  h(2:n/2) = 2;
elseif n>0
  % odd and nonempty
  h(1) = 1;
  h(2:(n+1)/2) = 2;
end
x = ifft(x.*h(:,ones(1,size(x,2))));

% Convert back to the original shape.
x = shiftdim(x,-nshifts);

2006-12-15 19:15
ranxing
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-12-17
收藏
得分:0 

用type语句
type hilbert

2006-12-18 14:32
快速回复:HILLBERT变换
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.062643 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved