This program converts the signals of any
PhysioBank record (or one in any compatible format) into a record.mat file
that can be read directly using any version of Matlab, and a short record.hea
text file containing information about the signals (names, gains, baselines,
units, sampling frequency, and start time/date if known). In addition,
wfdb2mat writes a brief summary of this information to the standard output.

The .mat and .hea output files can also be read by any WFDB application as
record RECm.

This program does not convert annotation files; for that task,
rdann(1)
is recommended.

The output .mat file contains a single matrix named
val, containing raw (unshifted, unscaled) samples from the selected record.
Using various options (below), one can select any time interval within
a record, or any subset of the signals, which can be rearranged as desired
within the rows of the matrix. Since .mat files are written in column-major
order (i.e., all of column n precedes all of column n+1), each vector of
samples is written as a column rather than as a row, so that the column
number in the .mat file equals the sample number in the input record. If
this seems odd, transpose your matrix after reading it!

This program writes
version 4 MAT-file format output files (see http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf
for details). The samples are written as 32-bit signed integers in little-endian
format if the record contains any format 24 or format 32 signals, as 8-bit
unsigned integers if the record contains only 8-bit unsigned samples, or
as 16-bit signed integers in little-endian format otherwise. Although version
5 and newer versions of Matlab normally use a different (less compact and
more complex) format, they can read these files without difficulty. The
advantage of version 4 MAT-file format, apart from compactness and portability,
is that files in these formats are still WFDB-compatible, given the .hea
file constructed by this program.

Begin
at the specified time. By default, wfdb2mat starts at the beginning of
the record.

-h

Print a brief usage summary.

-H

Read the signal files in high-resolution
mode (default: standard mode). These modes are identical for ordinary records.
For multifrequency records, the standard decimation of oversampled signals
to the frame rate is suppressed in high-resolution mode (rather, all other
signals are resampled at the highest sampling frequency).

-linterval

Limit
the amount of output to the specified time interval (in standard time format;
default: no limit). If both -l and -t are used, wfdb2mat stops at the earlier
of the two limits.

Convert only the signals named in the signal-list
(one or more input signal numbers or names, separated by spaces; default:
print all signals). This option may be used to re-order or duplicate signals.

Search for the first valid sample of the specified signal (a signal
name or number) at or following the time specified with -f (or the beginning
of the record if the -f option is not present), and begin converting at
that time.

This works even if the input files have not been downloaded; in this
case, wfdb2mat reads them directly from the PhysioNet server.

The output
files are mitdb/200m.mat and mitdb/200m.hea. Note that if a subdirectory
of the current directory named mitdb did not exist already, it would be
created by wfdb2mat. In addition, if the standard output of wfdb2mat has
been saved in a file named mitdb/200m.info, then the converted data can
be read and plotted in Matlab or Octave from within the mitdb directory
by running the command: plotATM(’200m.mat’, ’200m.info’)

(Download http://physionet.org/physiotools/matlab/plotATM.m and install it
in your Matlab or Octave environment first.)

Note that when EDF (or EDF+,
BDF, or BDF+) files are used as input, they may have empty ’physical dimension’
(units) fields, which imply that the associated signals are dimensionless
(for example, they may be event markers or categorical variables). In such
cases, wfdb2mat records the signal units as nd (no dimension).