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="wfdb-matlab-support@physionet.org"-->
<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>

<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
--></script>

<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>

<pre>
>> wfdb_url='http://physionet.org/physiotools/matlab/wfdb-swig-matlab/WFDB_Toolbox_0_0_3.zip';
>> [filestr,status] = urlwrite(wfdb_url,'WFDB_Toolbox_0_0_3.zip');
>> unzip('WFDB_Toolbox_0_0_3.zip');
>>wfdb_install; 
</pre>

<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="WFDB_Toolbox_0_0_3.zip">WFDB_Toolbox_0_0_3.zip</a>) and follow the instructions in <a href="README.txt">README.txt</a>.

</p>
<!--
A more recent development version of this toolbox may be available
<a href="http://physioforge.csail.mit.edu/wfdbtools/wfdb-swig-matlab/"
target="other">here</a>.
-->

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

<p>
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.

<p>
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:

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

<p>
At the moment, the following functions are implemented:

<p><center>
<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>
</table>
</center>
<p>
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
functions.

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

<p>
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).

<p>
The <a href="http://www.oracle.com/technetwork/java/index.htmldocs/books/jni/" 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.

<p>
<a href="http://www.swig.org/" 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.

<p>
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="http://www.mathworks.com/support/solutions/data/1-1812J.html?solution=1-1812J" target="other">MathWorks
technical note</a> on the subject.

<p>
The WFDB Toolbox has been developed and tested using Sun's Java
(available freely from <a href="http://www.java.com/"
target="other">http://www.java.com</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>

<p>
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>

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

<p>
<center>
<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>
  <td><em>PowerPC</em></td>
</tr>

<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>

<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>

<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>
</tr>
</table>
</center>

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

<p>
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="mailto:wfdb-matlab-support@physionet.org?subject=WFDB
Toolbox"> contact us</a> so that we can investigate the problem.

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

<p>
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.

<p>
<table border="0" cellpadding="4">
<tr><td>cURL</td> <td>7.19.3</td> <td><a href="http://curl.haxx.se" target="other">http://curl.haxx.se</a></td></tr>
<tr><td>GnuTLS</td> <td>2.6.4</td> <td><a href="http://www.gnu.org/software/gnutls" target="other">http://www.gnu.org/software/gnutls</a></td></tr>
<tr><td>GnuPG</td> <td>1.4.4</td> <td><a href="http://www.gnupg.org" target="other">http://www.gnupg.org</a></td></tr>
<tr><td>Libgpg-error</td> <td>1.7</td> <td><a href="http://www.gnupg.org/download/#libgpg-error" target="other">http://www.gnupg.org/download/#libgpg-error</a></td></tr>
<tr><td>Libidn</td> <td>1.12</td> <td><a href="http://www.gnu.org/software/libidn" target="other">http://www.gnu.org/software/libidn</a></td></tr>
<tr><td>WFDB</td> <td>10.4.21</td> <td><a href="/physiotools/wfdb.shtml">http://physionet.org/physiotools/wfdb.shtml</a></td></tr>
<tr><td>WFDB SWIG Wrappers</td> <td>10.4.1</td> <td><a href="/physiotools/wfdb-swig.shtml">http://www.physionet.org/physiotools/wfdb-swig.shtml</a></td></tr>
</table>

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

<p>
Compilation on GNU/Linux and Mac OS X is fairly straightfoward. On
Windows, <a href="http://mingw.org/" 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="http://code.google.com/p/wfdb-matlab-toolbox/downloads/list" target="other">Google Code wfdb-matlab-toolbox repository</a> or from <a href="http://mathworks.com/matlabcentral/fileexchange/36969-wfdb-toolbox-for-matlab" target="other">The MathWorks Code Repository</a>.


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