I hope someone can help me with these, seems to be a very simple problem, but I can't find the solution.
I have the following system of ODEs
As you can see, there are 3 variables, but their behavior not only depends on "t" but also on "u" which is the input to the system, an independent variable (in this case, a pulse train). U doesn't have a continous derivative equation, otherwise I would only define it as another variable "s4".
What I've done so far is sending the whole pulse train (for the time span) as an additional parameter and then find the u correspondent to each time using interpolation:
But this seems inefficient, so I'm sure there must be a better solution. I've looked through all the documentation on ODEs, and none seems to give a solution to this kind of problems.
Thanks very much if anyone can help me.