满意答案

blueinblue

2013.09.14

采纳率:41%    等级:12

已帮助:5800人

>> ver

----------------------------------

MATLAB Version 7.3.0.267 (R2006b)

>> type Hilbert

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-2004 The MathWorks, Inc.

% $Revision: 1.10.4.2 $ $Date: 2004/12/26 22:16:02 $

% 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);

00分享举报

matlab hilbert,谁有MATLAB的m文件Hilbert.m相关推荐

  1. MATLAB遍历子文件夹及其下文件

    MATLAB遍历子文件夹及其下文件 以前从未遇到过用MATLAB批处理文件的情况,此次项目需要批量将wav文件导入matlab进行处理,现将matlab遍历子文件夹及其文件的方法记录下来. 文件目录结 ...

  2. matlab读取xls、xlsx、csv文件

    常常我们在matlab里需要读取excel数据文件或者保存matlab中矩阵的数据.但是直接在matlab里用xlswrite写出的文件实际上是csv格式,在matlab里无法用xlsread读取.笔 ...

  3. matlab编写文件格式,MATLAB程序设计教程(4)——MATLAB文件操作

    MATLAB程序设计教程(4)--MATLAB文件操作 第4章MATLAB文件操作 4.1 文件的打开与关闭 4.2  文件的读写操作 4.3  数据文件定位 4.1 文件的打开与关闭 4.1.1 文 ...

  4. MATLAB如何修改打开时的默认文件夹或默认路径

    参考这篇文章: https://www.cnblogs.com/mat-wu/p/6135555.html 有一点需要补充,如果路径是有中文,那么使用notepad修改matlabrc.m后,会出现路 ...

  5. matlab 2014a 安装教程(内附破解文件)

    matlab 2014a 安装教程(内附破解文件) 这几天在准备数模,决心好好研究一下matlab,几经折腾,终于完成了安装与破解过程,下面是基本的步骤: 1:下载安装文件和破解文件     链接:h ...

  6. matlab读lExcel文字,matlab读取excel文件及其数据处理

    在许多时候我们要借助于matlab读取excel的内容进行处理,以下是一种常用的处理方法 office的表格文件也就是xls文件本质上就是一个二维矩阵,二维矩阵是用来保存数据的最佳方式,所以在日常工作 ...

  7. matlab查看hdf5数据,Matlab 操作 HDF5文件

    HDF5文件 在使用Matlab对数据进行预处理时,遇到了内存不足的问题,因为数据量太大,在处理完成以前内存已经爆满.如果使用Matlab的.m文件对文件进行存储的话,则需要将数据分割成多个文件,对后 ...

  8. MATLAB程序设计与应用 4.1 M文件

    MATLAB程序设计与应用 文章目录 MATLAB程序设计与应用 4. 第4章 MATLAB程序流程控制 4.1 M文件 4.1.1 M文件的建立与打开 4.1.2 M文件的分类 4. 第4章 MAT ...

  9. 解决低版本matlab打开高版本Matlab的.m文件时,出现中文乱码的问题。

    问题: 低版本matlab打开高版本Matlab的.m文件时,出现中文乱码. 比如下图: 原因: 编码格式不统一问题.Matlab高版本(2017a以上)默认保存编码格式是UTF-8格式,而低版本是G ...

最新文章

  1. 企业核心员工的长期激励计划
  2. perl 处理文件路径的一些模块
  3. php joomla,基于MySQL / PHP和Joomla的因特网管理信息系统设计
  4. 英语中十二个月名称的由来
  5. html水调歌头实验总结,水调歌头明月几时有反思小结
  6. Activity启动模式和FLAG、TASKAFFINITY
  7. [NOIP2011] 玛雅游戏
  8. 用php实现遍历目录
  9. Unity WIndows语音识别(一)关键字识别
  10. Java设计模式——装饰器模式
  11. Cydia Substrate插件编写
  12. android tcp 工具,TcpIp工具包app
  13. SAKAI OAE汉化
  14. 数学建模人口模型及matlab算法解
  15. 5、传输介质——大对数线缆
  16. 按下()快捷键 可以迅速锁定计算机,电脑锁定的快捷键
  17. 《Hexo: 从零开始编写自己的主题》2. 入门Hexo主题编写
  18. css 标点符号换行,字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose
  19. zabbix 5.0监控客户端
  20. TRS内容管理平台用户注册逻辑漏洞

热门文章

  1. QT学习笔记(语音识别项目 )
  2. Oracle项目管理系统之会议闭环管理
  3. 深度学习入门(三十三)卷积神经网络——ResNet
  4. Blender BMesh数据结构解密
  5. 漂亮的svg音乐播放器UI界面代码
  6. SAP 发布2022年第二季度财报
  7. mac上使用多个版本的EasyConnect
  8. Ubuntu Thinkpad E440 sdcard reader 驱动安装
  9. 米兔机器人第三代测评_精致易玩,米兔积木机器人拼装评测
  10. QNX演示自动在CES 2016驱动模块-QNX自动驾驶