During the ECG. An electrocardiogram can be done in a doctor's office or hospital and is often performed by a technician. You may be asked to change into a hospital gown. Then you'll lie on an examining table or bed. Electrodes — typically 10 — will be attached to chest and sometimes to your limbs.