matlab hilbert,谁有MATLAB的m文件Hilbert.m
满意答案
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相关推荐
- MATLAB遍历子文件夹及其下文件
MATLAB遍历子文件夹及其下文件 以前从未遇到过用MATLAB批处理文件的情况,此次项目需要批量将wav文件导入matlab进行处理,现将matlab遍历子文件夹及其文件的方法记录下来. 文件目录结 ...
- matlab读取xls、xlsx、csv文件
常常我们在matlab里需要读取excel数据文件或者保存matlab中矩阵的数据.但是直接在matlab里用xlswrite写出的文件实际上是csv格式,在matlab里无法用xlsread读取.笔 ...
- matlab编写文件格式,MATLAB程序设计教程(4)——MATLAB文件操作
MATLAB程序设计教程(4)--MATLAB文件操作 第4章MATLAB文件操作 4.1 文件的打开与关闭 4.2 文件的读写操作 4.3 数据文件定位 4.1 文件的打开与关闭 4.1.1 文 ...
- MATLAB如何修改打开时的默认文件夹或默认路径
参考这篇文章: https://www.cnblogs.com/mat-wu/p/6135555.html 有一点需要补充,如果路径是有中文,那么使用notepad修改matlabrc.m后,会出现路 ...
- matlab 2014a 安装教程(内附破解文件)
matlab 2014a 安装教程(内附破解文件) 这几天在准备数模,决心好好研究一下matlab,几经折腾,终于完成了安装与破解过程,下面是基本的步骤: 1:下载安装文件和破解文件 链接:h ...
- matlab读lExcel文字,matlab读取excel文件及其数据处理
在许多时候我们要借助于matlab读取excel的内容进行处理,以下是一种常用的处理方法 office的表格文件也就是xls文件本质上就是一个二维矩阵,二维矩阵是用来保存数据的最佳方式,所以在日常工作 ...
- matlab查看hdf5数据,Matlab 操作 HDF5文件
HDF5文件 在使用Matlab对数据进行预处理时,遇到了内存不足的问题,因为数据量太大,在处理完成以前内存已经爆满.如果使用Matlab的.m文件对文件进行存储的话,则需要将数据分割成多个文件,对后 ...
- MATLAB程序设计与应用 4.1 M文件
MATLAB程序设计与应用 文章目录 MATLAB程序设计与应用 4. 第4章 MATLAB程序流程控制 4.1 M文件 4.1.1 M文件的建立与打开 4.1.2 M文件的分类 4. 第4章 MAT ...
- 解决低版本matlab打开高版本Matlab的.m文件时,出现中文乱码的问题。
问题: 低版本matlab打开高版本Matlab的.m文件时,出现中文乱码. 比如下图: 原因: 编码格式不统一问题.Matlab高版本(2017a以上)默认保存编码格式是UTF-8格式,而低版本是G ...
最新文章
- 企业核心员工的长期激励计划
- perl 处理文件路径的一些模块
- php joomla,基于MySQL / PHP和Joomla的因特网管理信息系统设计
- 英语中十二个月名称的由来
- html水调歌头实验总结,水调歌头明月几时有反思小结
- Activity启动模式和FLAG、TASKAFFINITY
- [NOIP2011] 玛雅游戏
- 用php实现遍历目录
- Unity WIndows语音识别(一)关键字识别
- Java设计模式——装饰器模式
- Cydia Substrate插件编写
- android tcp 工具,TcpIp工具包app
- SAKAI OAE汉化
- 数学建模人口模型及matlab算法解
- 5、传输介质——大对数线缆
- 按下()快捷键 可以迅速锁定计算机,电脑锁定的快捷键
- 《Hexo: 从零开始编写自己的主题》2. 入门Hexo主题编写
- css 标点符号换行,字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose
- zabbix 5.0监控客户端
- TRS内容管理平台用户注册逻辑漏洞