MATLAB File Help: rdmat View code for rdmat WFDB Contents
rdmat



function varargout=rdmat(varargin)

 [tm,signal,Fs,siginfo]=rdmat(recordName)

 Import a signal in physical units from a *.mat file generated by WFDB2MAT.
 Required Parameters:

 recorName
       String specifying the name of the *.mat file.

 Outputs are:

 tm
       A Nx1 array of doubles specifying the time in seconds.
 signal
       A NxM matrix of doubles contain the signals in physical units.
 Fs
       A 1x1 integer specifying the sampling frequency in Hz for the entire record.
siginfo
       A LxN cell array specifying the signal siginfo. Currently it is a
       structure with the following fields:
       
        siginfo.Units
        siginfo.Baseline
        siginfo.Gain
        siginfo.Description

 NOTE:
       You can use the WFDB2MAT command in order to convert the record data into a *.mat file,
       which can then be loaded into MATLAB/Octave's workspace using the LOAD command.
       This sequence of procedures is quicker (by several orders of magnitude) than calling RDSAMP.
       The LOAD command will load the signal data in raw units, use RDMAT to load the signal in physical units.

 KNOWN LIMITATIONS:
       This function currently does support several of the features described 
       in the WFDB record format (such as multiresolution signals) :
          http://www.physionet.org/physiotools/wag/header-5.htm
       If you are not sure that the record (or database format) you are reading is
       supported, you can do an integrity check by comparing the output with RDSAMP:

       [tm,signal,Fs,siginfo]=rdmat('200m');
       [tm2,signal2]=rdsamp('200m');
       if(sum(abs(signal-signal2)) !=0);
          error('Record not compatible with RDMAT');
       end


 Written by Ikaro Silva, 2014
 Last Modified: November 26, 2014
 Version 1.2

 Since 0.9.7

 %Example:
 wfdb2mat('mitdb/200')
tic;[tm,signal,Fs,siginfo]=rdmat('200m');toc
tic;[tm2,signal2]=rdsamp('200m');toc
 sum(abs(signal-signal2))


 See also RDSAMP, WFDB2MAT