I'm using MATLABs ODE suite to solve a system of 13 differential equations that determine the behavior of a neuron. Now I'd like to add a second neuron, that is operated by the same set of differential equations, but is influenced by the first neuron. More importantly, this second neuron will also influence the first neuron. (Feedforward and feedback between these two cells.)
Is there a convenient way to do this? Can I distribute the differential equations over two function files or do I have to copy them below the original ones, such that there is a longer list of equations in the same file? I'd like to be able to have one file per cell and to somehow keep this organized. (Also in case I might want to expand it again to three or four neurons.)
If my question is in any way unclear or not specific enough, please indicate. I'll try and explain what I'm doing/trying better.
You have to split the big vector of all variables into the sub-arrays of the variables of each neuron, call each file with its variables and then concatenate the resulting direction vectors.
If the neurons behave similarly, you should think about having one method (file) with a loop inside for the neuron function-internal part of the direction and after that probably a double loop for the interaction terms. Put the connectivity information into a data structure to be flexible in changing it.