主题:matlab连接心电数据库--一大难题
yidian2008
[专家分:0] 发布于 2007-03-12 11:31:00
[em15]matlab连接心电数据库--一大难题
我想用matlab 连接 mitdb 心电图数据库。但是连接过程中出现问题,一直不知怎样解决。不知道有没有这方面的同行帮忙解决一下?
出错:Unable to load mex file: c:\wfdb_tools\WFDB_isigopen.dll.
找不到指定的模块。
我已经将VC/VC++装上,用的是matlab R13(即6.5)
参考 连接过程文件见 附件1
出现问题如下:(选择5a)
example.m - demonstration of the WFDB_tools wrappers for Matlab
[Press any key to continue]
example1.m - demonstration of reading signals using WFDB_tools
[Press any key to continue]
We begin by opening the input signals, using
hea = WFDB_isigopen(record);
Information about the signals is loaded into "hea":
Unable to load mex file: c:\wfdb_tools\WFDB_isigopen.dll.
找不到指定的模块。
??? Invalid MEX-file
Error in ==> c:\WFDB_tools\examples\example1.m
On line 54 ==> hea = WFDB_isigopen(record)
Error in ==> c:\WFDB_tools\examples\example.m
On line 49 ==> example1;
回复列表 (共5个回复)
沙发
yidian2008 [专家分:0] 发布于 2007-03-12 16:31:00
file: 00README G. Moody and G. Clifford 30 November 2003
Last revised: 29 April 2006
WFDB_tools quick start
This package of software was written by Jonas Carlson, who has contributed it
to PhysioNet for free use and redistribution. The WFDB_tools package allows
Matlab R13 users to use the WFDB library to read and write digitized signals
and annotations such as those available from PhysioNet.
These notes provide a highly condensed set of instructions for installing
WFDB_tools under MS-Windows, Linux, MacOS X, and other versions of Unix.
(Installation has been tested under Linux and MS-Windows XP only.) Please see
http://www.physionet.org/physiotools/matlab/wfdb_tools/
for further information about this software.
Under MS-Windows:
1. Install the Cygwin software package, following the instructions at
http://cygwin.com/
Install Cygwin in a location that does not have any spaces in its
pathname. The default and preferred location is c:\cygwin. Do not use
locations under "Program Files", "Documents and Settings", or any other
directory containing a space in its name. Be sure to select and
install the gcc, binutils, make, and perl packages from the Devel category
(these are not installed by default in a minimal Cygwin installation).
(This procedure has been tested using Cygwin 1.5.5; if you have an
older version previously installed, we recommend updating it to 1.5.5
or later.)
2. Install the WFDB software package, version 10.4.1 or later, following
the instructions at
http://www.physionet.org/physiotools/wfdb-windows-quick-start.shtml
If you will be using Matlab R14 or later, install the standard (Cygwin)
version first, then install a set of native Windows binaries as described
near the end of the Windows quick start guide.
3. Install Matlab R13 or later if you have not already done so. These
wrappers will not work with older versions of Matlab.
4. If you have not already done so, download
http://www.physionet.org/physiotools/matlab/WFDB_tools.tar.gz
In a Cygwin window, navigate to the directory containing WFDB_tools.tar.gz
and unpack it by running the command
tar xfvz WFDB_tools.tar.gz
This command creates a new directory named WFDB_tools-X.Y.Z, where
X, Y, and Z depend on the version number of the package you have
downloaded. For example, the name is WFDB_tools-0.5.3 for version 0.5.3.
Enter this directory by typing
cd WFDB_tools-0.5.3
(or whatever version is correct). In the following steps, "this
directory" means your local copy of the WFDB_tools-X.Y.Z directory
(which is the current directory if you have followed these instructions).
You can use the precompiled .dll files provided in the "windows" directory, or
you can recompile them from the .c sources provided in the "src" directory.
Choose only one of steps 5a and 5b:
5a. [To use the precompiled .dll files] Copy all of the files from the
"windows" and "help" directories into this directory.
5b. [To recompile the .dll files from the .c sources] Copy all of the files
from the "src" and "help" directories into this directory.
Install gnumex following the instructions at
http://gnumex.sourceforge.net/
Be sure to start Matlab from within a Cygwin terminal emulator to
ensure that the environment variables are set appropriately before
running the gnumex configuration script from the Matlab prompt. Accept
the defaults offered by gnumex (Cygwin linking, generate mex dll, use
C/C++ for compilation, safe compile) to create mexopts.bat. Copy
mexopts.bat into the directory containing the WFDB_tools files (where
this README is located).
Edit the copy of mexopts.bat, changing the line that sets GM_ADD_LIBS
(below "Added libraries for linking") so that it reads:
set GM_ADD_LIBS=wfdb-10.4.dll
At the Matlab prompt, add paths corresponding to cygwin, gnumex and wfdb:
addpath C:\cygwin
addpath C:\gnumex
addpath C:\cygwin\opt\wfdb\bin
(substituting the locations where these packages are installed on your
system).
Finally, ensure that your current directory is the one that contains this
README file, and run:
make_WFDB_dlls
within Matlab to compile the WFDB_tools dlls.
6. To be able to use the WFDB_tools from any directory, add the directory
containing the WFDB_tools dlls to your path, by typing at the Matlab
prompt:
addpath C:\WFDB_tools
(substituting the name of the directory containing the .dll files).
7. Test the WFDB_tools by running "example.m" (in the "examples" directory)
from the Matlab prompt.
板凳
xwt_sea [专家分:0] 发布于 2007-04-05 23:02:00
不知搂主问题解决了没有,我也出现了相同问题
3 楼
冰清世界 [专家分:50] 发布于 2007-04-10 09:30:00
我觉得也可以从另一种角度来导入心电图.比如说,你可以从physionet.net网站上下载下来你所需要的数据段,存储为文本文档,然后用textread 来调用
4 楼
lhlbiocare [专家分:0] 发布于 2007-09-25 14:21:00
[quote]我觉得也可以从另一种角度来导入心电图.比如说,你可以从physionet.net网站上下载下来你所需要的数据段,存储为文本文档,然后用textread 来调用[/quote]
由于数据格式的问题估计会出现乱码。
我也是用的MIT的数据库,我是把数据库直接下载下来放到一个文件夹中,用专门读文件的程序来读的,没什么问题啊。在MIT数据库的那网站上就有matlab和C读数据解码的源程序,有人需要的话我可以提供读文件的matlab程序
有意者可以加QQ:314418864
5 楼
flyingpigwxn [专家分:0] 发布于 2008-03-10 19:25:00
我也出现了跟你一样的问题,而且不管用5a,还是千辛万苦用5b,结果都一样,郁闷死了。
我来回复