您现在的位置是:首页 > 世界杯 >正文
dafa黄金版体育ios下载全站 (关于dafa黄金版体育ios下载全站 玩法)
发布时间:2022-11-23 23:57:32admin来源:世界杯
EMD工具箱,在MATLAB中实现EMD的各种功能所必须的工具箱。
运行install_emd.m文件可以实现此工具箱的安装,uninstall_emd.m实现卸载。
1、首先下载emd工具箱,50楼网址里面可以下。下载后解压放在matlab的work工作路径下package_emd文件夹。
2、打开matlab,选择File- Set Path- Add with Subfolders-你刚才下载的工具箱(package_emd)点进去- Save- Close。
3、此时选择work下package_emd文件夹作为工作路径,即是C:\Program Files\MATLAB\R2010a\toolbox\package_emd。
4、在Command Window里面输入mex -setup回车,问是否选择已有的编译器你选y回车,再问选择哪个编译器,你可以选择C++的那个选择相应的编号(如 2)回车,然后让你核对是否选择对了编译器等等,你输入y回车。就安装成功了
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2010a\sys\lcc
[2] Microsoft Visual C++ 6.0 in C:\Program Files\Microsoft Visual Studio
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio
Are these correct [y]/n? y
Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win32\mexopts\msvc60opts.bat
Done . . .
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************
MATLAB的emd的工具箱 可是不知道怎么用 也不知道怎么用它来处理txt中的数据
但是安装的时候,如果使用的是VS的编译器(mbuild –setup、mex –setup设置),会报找不到complex.h的问题(用Linux下的Matlab不会出错),从而使cemdc2_fix.c等文件编译失败,这几个文件是为了快速实现计算EMD而用c编写的,所以即使编译失败,也不影响直接使用emd.m实现EMD功能。如果想编译成功,可如下修改:(摘自http://www.chinavib.com/thread-79866-1-1.html)
G. Rilling 07年3月份的程序,运行作者的install_emd.m,出现找不到complex.h的问题,以下是个人的理解和解决过程:(个人的运行环境为matlab6.5)
complex.h的问题
产生原因:采用matlab的C编译函数mex时,定义了C99_OK的宏(EMDS/make_emdc.m (28行)),利用的是ANSI C99标准如果个人的电脑中没有相关的支持,就会出现这个问题。
解决方法:EMDS/make_emdc.m中第28行中mex(’-DC99_OK‘,args(:))语句中的 '-DC99_OK' 即可。
注意:
改完之后,运行install_emd,会出现M_PI没有定义的问题,缺少了常数PI的宏定义,导致一些.c文件编译失败。
产生原因:去掉C99_OK之后,程序中使用的是作者提供的 emd_complex.h和emd_complex.c两个文件来支持复数运算,这两个文件中,并没有定义M_PI这个宏。
解决方法:M_PI这个宏,只在两个文件中(clocal_mean.c和clocal_mean2.c)使用,个人的解决方法是,在相应的头文件(clocal_mean.h和clocal_mean2.h)中加入M_PI的宏定义即可。
在两个.h文件中分别加入一下语句:
#define CLOCAL_MEAN_H
#ifndef M_PI
#define M_PI 3.1415926
#endif
安装完成后,编译输出的.dll文件会出现,重复后缀名的问题,及 xxx.dll 变成了 xxx.dll.dll自己去掉多余的.dll即可
最后,关于版本问题:作者推荐使用7.1+版本,但只是针对个别的函数有影响,主要是作者提供的例子程序,无法在matlab6.5环境中运行,算法的主要功能函数并不受影响。
工具箱函数
运行help index_emd可以查看工具箱提供的函数,如下
index_emd.M list of functions in the EMD package type help function_name for more information ona specific function Empirical Mode Decomposition emd - computes EMD and bivariate/complex EMD with various options emd_local -computes local EMD variation emd_online - computes on-lineEMD variation. Note that it does not truly apply on-line: the function is only a demonstration. emdc - fast implementation for EMD with Cauchy-like stoppingcriterion (requires compilation, see make_emdc function) emdc_fix - fast implementation for EMD with predefined number ofiterations (requires compilation, see make_emdc function) cemdc - fast implementation for bivariate/complex EMD (firstalgorithm) with Cauchy-like stopping criterion (requires compilation, see make_emdc function) cemdc_fix -fast implementation for bivariate/complex EMD (firstalgorithm) with predefined number of iterations (requires compilation, see make_emdc function) cemdc2 - fast implementation for bivariate/complex EMD (secondalgorithm) with Cauchy-like stopping criterion (requires compilation, see make_emdc function) cemdc2_fix - fastimplementation for bivariate/complex EMD (second algorithm) with predefined number of iterations (requires compilation, see make_emdc function) Utilities install_emd - setup Matlab'spath and compile the C codes. uninstall_emd - revert the modifications made by install_emd andremove the files (optional). make_emdc - compile all C codes emd_visu - visualization of EMD cemd_visu - visualization of bivariate/complex EMD (automaticallycalled by emd_visu when the input is complex) cenvelope - compute envelope curves for bivariate/complex EMD cemd_disp - visualization of envelope curves and tube envelope plot3c - plot a complex vector in 3 dimensions plotc - plot the projection of a complex vector on a variabledirection dirstretch -directional stretching of a complex vector hhspectrum -compute Hilbert-Huang spectrum (need the Time-FrequencyToolbox http://tftb.nongnu.org) toimage - transform a spectrum made of 1D functions (e.g., output of hhspectrum) in an 2D image disp_hhs - display the image output of toimage as a Hilbert-Huangspectrum addtag - add a tag to a graphic object (uses the Tag property as alist of keywords or tags) rmtag - remove a tag from a graphic object (uses the Tag propertyas a list of keywords or tags) hastag - test whether a graphic object has a specific tag (uses theTag property as a list of keywords or tags) findtag - find objects having a specific tag (uses the Tag propertyas a list of keywords or tags) Examples from G. Rilling, P. Flandrin and P.Gon鏰lves, OnEmpirical Mode Decomposition and its algorithms IEEE-EURASIPWorkshop on Nonlinear Signal and Image Processing NSIP-03,Grado (I), June 2003 emd_fmsin - Fig. 1: a 3-component example (need the Time-Frequency Toolbox http://tftb.nongnu.org) emd_triang - Fig. 2: another 3-component example emd_sampling - Fig. 3: effect of sampling on 1 tone emd_separation - Fig. 4: separation of 2 tones ex_online - Sect 3.4: the way emd_online.m works triangular_signal - subroutine called by emd_triang (formerlytriang.m) Examples from G. Rilling, P. Flandrin, P.Gon鏰lves and J. M. Lilly, BivariateEmpirical Mode Decomposition, SignalProcessing Letters (submitted) bivariate_EMD_principle - Fig. 1: principle of the bivariate/complex EMD bivariate_EMD_mean_definitions - Fig. 2: definition of the mean foreach algorithm. Also allows to test other signals and parameter sets. bivariate_EMD_illustration - Fig. 3: illustration of the bivariate EMD on an oceanographic float position record
稍做整理如下:
来自《On Empirical Mode Decomposition and itsalgorithms》的Examples
来自《Bivariate Empirical Mode Decomposition》的Examples
EMD
clc
clear all
close all
% 原始数据
fs = 1000;
ts = 1/fs;
t=0:ts:0.3;
z=2*sin(2*pi*10*t) + 5.*sin(2*pi*100*t);
figure
plot(t, z)
title('原始信号')
% EMD
imf=emd(z);
emd_visu(z,t,imf)
[A,f,tt]=hhspectrum(imf);
[im,tt]=toimage(A,f);
disp_hhs(im);
边际谱
clc
clear all
close all
% 原始数据
fs = 1000;
ts = 1/fs;
t=0:ts:0.3;
y=2*sin(2*pi*10*t);% + 5.*sin(2*pi*100*t);
figure
plot(t, y)
title('原始信号')
% 求Hilbert-Huang谱
[A,fh,th] = hhspectrum(y);
figure
subplot(211)
plot(th*ts, A)
title('瞬时幅值') % 就是包络
subplot(212)
plot(th*ts, fh*fs)
title('瞬时频率')
% 显示结果
[im,tt,ff] = toimage(A,fh,th);
disp_hhs(im,tt)
colormap(flipud(gray))
% 编程实现显示
figure
imagesc(tt*ts,[0,0.5*fs],im);
ylabel('frequency/Hz')
set(gca,'YDir','normal')
xlabel('time/s')
title('Hilbert-Huang spectrum')
更详细的使用说明可以参见例子程序,如emd_fmsin.m程序,运行结果如下
EMD分解如下
可以看到,EMD实现的3个组分的分离(即分别分解到了IMF1~3中),可见EMD的强大功能。
dafa黄金版体育ios下载全站猜你喜欢
最新文章
- dafa黄金版体育ios下载全站 (关于dafa黄金版体育ios下载全站 玩法)
- 金大发体育平台 (关于金大发体育平台 玩法)
- hg皇冠现金 (关于hg皇冠现金 玩法)
- 浙江体彩历史开奖查询最精准 (关于浙江体彩历史开奖查询最精准 玩法)
- 澳门三公娱乐棋牌 (关于澳门三公娱乐棋牌 玩法)
- 微信上怎么玩斗牛游戏规则 (关于微信上怎么玩斗牛游戏规则 玩法)
- 澳门买球官方网 (关于澳门买球官方网 玩法)
- 男子地下车库练摩托车撞400万宾利,各方互相推诿责任该谁来负?
- 亚博股票 (关于亚博股票 玩法)
- 男子地下车库练摩托车撞400万宾利:男子在地下车库练摩托车撞上400万宾利,维修费用50万该谁承担?
- 男子地下车库练摩托车撞400万宾利:杭州一男子借朋友摩托车在地下车库练习,不慎撞坏400万宾利,律师:需承担全责
- 双色球神奇逆向排除法 (关于双色球神奇逆向排除法 玩法)
- 男子地下车库练摩托车撞400万宾利,维修费50万!责任划分引热议
- 金神娱乐 (关于金神娱乐 玩法)
- 男子地下车库练摩托车撞400万宾利:400万宾利停地库被摩托撞坏,物业否认有责任:应按交警定责处理
- 男子地下车库练摩托车撞400万宾利
- 点球大战买球规则 (关于点球大战买球规则 玩法)
- 男子地下车库练摩托车撞400万宾利:小伙地下车库练摩托车 撞了400多万的宾利
- mg电子游艺怎么代理 (关于mg电子游艺怎么代理 玩法)
- 公章和王传福签名遭伪造 比亚迪报警:比亚迪公章和王传福签名遭伪造,官方回应:已报警
- 欧卡注册 (关于欧卡注册 玩法)
- 公章和王传福签名遭伪造 比亚迪报警:某公司伪造公章和王传福签名,比亚迪报警
- 皇冠体育娱乐官网 (关于皇冠体育娱乐官网 玩法)
- 公章和王传福签名遭伪造 比亚迪报警:被伪造公章和签名,比亚迪报警