I am using ode15s to solve a differential equation in a combustion particle system. The problem that I have is that the ode_func that I am putting in ode15s has some data inside of it that I want to get outsie of the function. This data is not the output of the ode_func, so it's not saved as output. My question is how is the best way to get it out? Should I use a global variable inside the ode_func that updates it's value while it solves, then I can access it outside of the func? Or is it possible to add another output to the ode_func? I'm not sure how the ode15s would handle multiple outputs from the ode_func.