ikarosilva / wfdb-app-toolbox

The WFDB Toolbox for MATLAB/Octave is a collection of functions for reading, writing, and processing physiologic signals in the formats used by PhysioNet (see README for details).
http://physionet.org/physiotools/matlab/wfdb-app-matlab/
GNU General Public License v3.0
93 stars 46 forks source link

mexrdsamp to do list #134

Open cx1111 opened 8 years ago

cx1111 commented 8 years ago
cx1111 commented 8 years ago

I am trying to figure out the best way to solve the de-interleaving issue, as in arranging the samples in the correct order for the output matlab matrix. An inefficient solution is easy but we want to save as much computation as possible.

  1. If we don't know the signal length beforehand

_EDIT: Done. Dynamically allocate growing array. Copy over to another array to de-interleave. _

  1. If we do know the signal length beforehand.
    • Preallocate a double pointer and store the samples in the correct indices. Point the matlab matrix to it and reshape. Easy.

from and to default to 0 unless explicitly specified. strtim("e") gives 0 if missing or gives the signal length. freq gives the sampling frequency or defaults to 250.