An electrocardiogram (ECG) a diagnostic tool that records heart's electrical activity. The electrical activity originates from the myocardial cells, which are responsible for generating and conducting these signals. Myocardial cells are depolarized and repolarized automatically and rhythmically.