I had to solve a similar problem, solving
dx/dt= (b(t)-x(t)/tau
where b(t) is a step function.
To solve i wrote 3 files. Two files for the step signal, i.e. the stepsignal function and the r.h.s function that is used in it.
The third file(script) solves dx/dt= (b(t)-x(t)/tau by calling the...