This document discusses detecting R-peaks in an electrocardiogram (ECG) signal using MATLAB. It describes the basic task of ECG processing as R-peak detection and some challenges like irregular peaks and breathing noise. The key steps are presented as removing low frequencies, applying a window filter twice to detect peaks, and optimizing the filter window size. Code examples are provided to demonstrate the processing pipeline on two ECG samples, showing the original signal and results of each step. The document concludes by instructing the reader to type "ecgdemo" in the MATLAB command window to run the code.