working version of Repetitive Convolution Code (works on NEURON simulator and Matlab)