Wrapper to WFDB RDSAMP:
Reads a WFDB record and returns:
NxM matrix (doubles) of M signals with each signal being N samples long.
Signal data type will be either in double int16 format
depending on the flag passed to the function (according to
the boolean flags below).
1xM Double, sampling frequency in Hz of all the signals in the
% tm (Optional)
Nx1 vector of doubles representing the sampling intervals.
Depending on input flags (see below), this vector can either be a
vector of integers (sampling number), or a vector of elapsed time
in seconds ( with up to millisecond precision only).
String specifying the name of the record in the WFDB path or
in the current directory.
Optional Parameters are:
A Mx1 array of integers. Read only the signals (columns)
named in the signalList (default: read all signals).
A 1x1 integer specifying the sample number at which to stop reading the
record file (default read all the samples = N).
A 1x1 integer specifying the sample number at which to start reading the
record file (default 1 = first sample).
A 1x1 integer (default: 0). Returns tm and signal as vectors
according to the following values:
rawUnits=0 - Uses Java Native Interface to directly fetch data, returning signal in physical units with double precision.
rawUnits=1 -returns tm ( millisecond precision only! ) and signal in physical units with 64 bit (double) floating point precision
rawUnits=2 -returns tm ( millisecond precision only! ) and signal in physical units with 32 bit (single) floating point precision
rawUnits=3 -returns both tm and signal as 16 bit integers (short). Use Fs to convert tm to seconds.
rawUnits=4 -returns both tm and signal as 64 bit integers (long). Use Fs to convert tm to seconds.
A 1x1 boolean (default =0). If true, reads the record in high
resolution mode. Ignored if rawUnits == 0.
Written by Ikaro Silva, 2013
Last Modified: April 3, 2015
%Example 1- Read a signal from PhysioNet's Remote server:
%Example 2-Read 1000 samples from 3 signals
[signal,Fs,tm]=rdsamp('mghdb/mgh001', [1 3 5],1000);
%%Example 3- Read 1000 samples from 3 signlas in single precision format
[signal,Fs,tm]=rdsamp('mghdb/mgh001', [1 3 5],1000,,2);
%%Example 4- Read a multiresolution signal with 32 samples per frame
[sig,Fs,tm] = rdsamp('drivedb/drive02',,,,,1);
See also WFDBDESC, PHYSIONETDB, WFDBDOWNLOAD