A method is provided for neuromodulation to treat stroke. One step of the method includes recording an input waveform from a first site in the nervous system in a source subject. The first site is healthy or at least partially functioning. Next, an output waveform is applied to a second site in the nervous system of a target subject suffering from the stoke. The second site is diseased due to the stroke.