next up previous contents
Next: WFDB_putvec Up: Reading and writing signals Previous: Reading and writing signals   Contents


WFDB_getvec

DATA = WFDB_getvec(NSIG);
DATA = WFDB_getvec(NSIG, NSAMP);
DATA = WFDB_getvec(NSIG, NSAMP, TSTART);

NSIG: Number of signals.
NSAMP: (Optional) Number of samples to read. TSTART: (Optional) Sample number of the first sample to read

This function reads samples from open input signals. Typically, we prepare to use this function by

    S = WFDB_isigopen(record);
    NSIG = length(S);
to open the signals for a record of choice, and to determine NSIG, the number of signals available in the record.

To read NSAMP samples of each signal, beginning at sample number TSTART:

   DATA = WFDB_getvec(NSIG, NSAMP, TSTART);
The first sample of each signal has sample number 0 (not 1!).

To read the next NSAMP samples of each signal:

   DATA = WFDB_getvec(NSIG, NSAMP);
This form returns up to NSAMP samples, from sample number T to sample number T+NSAMP-1, where T is the input pointer (initially 0). The input pointer is incremented by the number of samples that have been read, so that a subsequent use of WFDB_getvec returns the next NSAMP samples, etc. Use WFDB_isigsettime (see section 3.4.1) to set the input pointer directly.

If the record is not too long, read it all at once by:

   DATA = WFDB_getvec(NSIG);
Note that recordings can be arbitrarily long and are often much larger than available memory; also note that there may be a very long delay if an entire record is read from a remote web server over a slow link.


next up previous contents
Next: WFDB_putvec Up: Reading and writing signals Previous: Reading and writing signals   Contents
George Moody 2003-11-30