WFDB SWIG Toolbox for MATLAB 1.0.0

File: <base>/new_version.shtml (9,703 bytes)
<!--#set var="TITLE" value="The WFDB Toolbox for MATLAB"-->
<!--#include virtual="/head.shtml"-->
<!--#set var="CONTACT" value=""-->
<script language="javascript" type="text/javascript"><!--
  function isJWSInstalled()
     if (navigator.mimeTypes && navigator.mimeTypes.length
         && navigator.mimeTypes["application/x-java-jnlp-file"])
        return true;

  var jwsKnownToBeInstalled = isJWSInstalled();
  var tryIE = (jwsKnownToBeInstalled ? "false" : "true" );

<script language="vbscript" type="text/vbscript"><!--
  on error resume next
  if tryIE = "true" Then
    if IsObject(CreateObject("JavaWebStart.isInstalled")) Then
      jwsKnownToBeInstalled = 1
    end If
  end If

<a name="intro"><h2>Quick Start</h2></a>

<p>For Quick installation of the WFDB Toolbox open MATLAB, cd into a temporary directory, and run the following commands: </p>

>> wfdb_url='';
>> [filestr,status] = urlwrite(wfdb_url,'');
>> unzip('');

<p>Note: After the WFDB_INSTALL script completes sucessfully, it will request you to copy 2 MATLAB path files to MATLAB's standard directory and restart MATLAB. Failure to do so will result in error messages when attempting to use the toolbox functions.</p> 

<p> Alternatively, to install the WFDB Toolbox manually download latest version of the toolbox (<a href=""></a>) and follow the instructions in <a href="README.txt">README.txt</a>.

A more recent development version of this toolbox may be available
<a href=""

<h2>What is the WFDB Toolbox for MATLAB?</h2>

The WFDB Toolbox for MATLAB is a collection of applications for reading,
writing, manipulating, and plotting <a href="/physiobank/">PhysioBank</a> data,
implemented as functions in MATLAB.

Since it's based on the <a href="/physiotools/wfdb.shtml">WFDB Software
Package</a>, the WFDB Toolbox for MATLAB supports reading data directly from
this web site (using HTTP).  For example, in MATLAB, one can very
simply download and plot a signal:

>> r = rdsamp('mitdb/100', 'maxt', ':10');
>> plot(r(:,1), r(:,2));

At the moment, the following functions are implemented:

<table border="0">
<tr> <td><tt>rdann</tt></td> <td>read annotation files for WFDB
    records</td> </tr>

<tr> <td><tt>rdsamp</tt></td> <td>read signal files of WFDB
    records</td> </tr>

<tr> <td><tt>setwfdb</tt></td> <td>set WFDB paths to default
    values</td> </tr>

<tr> <td><tt>time2sec</tt></td> <td>convert WFDB-format time
    intervals into seconds</td> </tr>

<tr> <td><tt>wfdb_config</tt></td> <td>return version and
    compilation information about the WFDB library</td> </tr>

<tr> <td><tt>wfdbdesc</tt></td> <td>return specifications for
    signals in WFDB records</td> </tr>

<tr> <td><tt>wfdbwhich</tt></td> <td>find the location of files
    belonging to WFDB records</td> </tr>

<tr> <td><tt>wrann</tt></td> <td>write annotations for WFDB
    records into annotation files</td> </tr>

<tr> <td><tt>wrsamp</tt></td> <td>write signal data into
    WFDB-compatible records</td> </tr>
These functions provide MATLAB interfaces to some of the most useful
stand-alone (command-line) <a href="/physiotools/wfdb.shtml#applications">WFDB
applications</a>, which are more fully documented
<a href="/physiotools/wag/wag.htm">here</a>.  Many, but not all, of the
features of the stand-alone applications are accessible via these Toolbox

<a name="implementation"><h3>Notes about implementation</h3></a>

The WFDB Toolbox for MATLAB makes use of the compiled WFDB library
itself. This means that separate shared libraries are distributed
for each supported platform (operating system and CPU).

The <a href="" target="other">Java Native
Interface</a>, or JNI, is used to create bindings to the WFDB 
library from Java code: system-independent Java code implements the
WFDB Toolbox, and it makes use of the native WFDB library through JNI.

<a href="" target="other">SWIG</a> is used to
create bindings for the WFDB library automatically: it creates a thin
layer of code, using JNI, to interface with WFDB.

To use the WFDB Toolbox, you must have installed MATLAB 7 (R14, 2004)
or later, with a working Java Virtual Machine (JVM) that supports Java
1.4 or later.  There are currently no plans to support earlier
versions of MATLAB or Java.  If necessary, it may be possible to
upgrade the JVM used by an installation of MATLAB; see this
<a href="" target="other">MathWorks
technical note</a> on the subject.

The WFDB Toolbox has been developed and tested using Sun's Java
(available freely from <a href=""
target="other"></a>).  It is compatible with at
least some versions of OpenJDK (IcedTea); if you have problems
installing it using IcedTea, try using Sun's Java.  Future versions of
OpenJDK and of the WFDB Toolbox should be fully compatible.

<a name="platforms"><h2>Supported Platforms</h2></a>

The WFDB Toolbox has been tested on all platforms currently supported by
MATLAB, except for Solaris 64;  it additionally runs on MacOS X PPC (which
is supported only by older versions of MATLAB).

<a name="os_and_arch"><h3>Operating systems and architectures</h3></a>

The following table shows which CPU architectures are supported for
which operating systems.

<table border="0" cellpadding="8">
<tr> <td></td>
  <td><em>AMD64</em>, a.k.a. <em>x86-64</em></td>
  <td><em>i386</em>, a.k.a. <em>x86 (IA-32)</em></td>

<tr> <td><em>Windows XP/Vista/7</em></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#bb0000">N/A</font><b></td>

<tr> <td><em>GNU/Linux</em></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#bb0000">N/A</font><b></td>

<tr> <td><em>Mac OS X 10.5 and later</em></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>
  <td style="background: #ddd;"><b><font color="#00bb00">YES</font><b></td>

<a name="matlab_versions"><h3>MATLAB versions</h3></a>

Though only a few versions of MATLAB have been tested (including 7.0,
7.1, 7.3, 7.7, and 7.10), the WFDB Toolbox is expected to work for any
version of MATLAB with a JVM version 1.4.0 or higher. If you are
having trouble with a version of MATLAB that you think should work,
you are strongly encouraged
to <a href="
Toolbox"> contact us</a> so that we can investigate the problem.

<a name="dependencies"><h3>Notes on dependencies</h3></a>

The following external dependencies are used by the WFDB Toolbox for MATLAB. The
version numbers listed are those of the shared libraries distributed
with the WFDB Toolbox; using a newer minor version of any of these should be
safe, but is not necessarily guaranteed to work.

<table border="0" cellpadding="4">
<tr><td>cURL</td> <td>7.19.3</td> <td><a href="" target="other"></a></td></tr>
<tr><td>GnuTLS</td> <td>2.6.4</td> <td><a href="" target="other"></a></td></tr>
<tr><td>GnuPG</td> <td>1.4.4</td> <td><a href="" target="other"></a></td></tr>
<tr><td>Libgpg-error</td> <td>1.7</td> <td><a href="" target="other"></a></td></tr>
<tr><td>Libidn</td> <td>1.12</td> <td><a href="" target="other"></a></td></tr>
<tr><td>WFDB</td> <td>10.4.21</td> <td><a href="/physiotools/wfdb.shtml"></a></td></tr>
<tr><td>WFDB SWIG Wrappers</td> <td>10.4.1</td> <td><a href="/physiotools/wfdb-swig.shtml"></a></td></tr>

Note that GnuTLS, GnuPG, and Libgpg-error can be omitted if SSL
support in cURL is turned off.

Compilation on GNU/Linux and Mac OS X is fairly straightfoward. On
Windows, <a href="" target="other">MinGW</a> is required.  
It should be possible to use Cygwin's gcc with the -mno-cygwin option
to compile native Windows binaries, but this has not been tested.
Linking with Cygwin's POSIX emulation DLL (cygwin1.dll) is not recommended,
as it does not interact well with JNI.

<a name="source"><h3>Alternative Download Sites</h3></a>

<p>The WFDB Toolbox can also be downloaded from the <a href="" target="other">Google Code wfdb-matlab-toolbox repository</a> or from <a href="" target="other">The MathWorks Code Repository</a>.

<!--#include virtual="/footer.shtml" -->