DATA = WFDB_getvec(NSIG); DATA = WFDB_getvec(NSIG, NSAMP);
NSIG: Number of signals.
NSAMP: Number of samples 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);
If the recording is not too long, it can be read all at once:
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.
A better strategy is to read a segment of NSAMP samples from each signal, choosing a value of NSAMP that is a suitable amount to process in memory:
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.