Stimulation of nervous system components by electrodes can be used in many applications, including in the operation of brain-machine interfaces, bidirectional neural interfaces, and neuroprosthetics. The optimal operation of such systems requires a means of accurately measuring neural responses to such stimulations. However, currently the measurement of neural responses is difficult due to heavy stimulation artifacts arising from stimulatory pulses. The invention encompasses novel methods of estimating stimulation artifacts in measurements attained by recording electrodes and the effective removal of these artifacts. This provides improved neural recording systems and enables the deployment of closed-loop neural stimulation systems.