  We describe techniques and specifications of MATLAB software to process
ambulatory electrocardiogram (ECG) data. Through template-based beat
identification and simple pattern recognition models on the intervals between
regular heart beats, we filter noisy sections of waveform and ectopic beats.
Our end-to-end process can be used towards analysis of ECG and calculation of
heart rate variability metrics after beat adjustments, removals and
interpolation. Classification and noise detection is assessed on the
human-annotated MIT-BIH Arrythmia and Noise Stress Test Databases.
