I have a system of differential equations, of which I'm trying to solve using the ode45 integrator. I also have a function, say delx, that is dependant on the x(1) component that the ode45 integrator would output.
After giving delx an initial value and using this first value of delx to compute my system using ode45 for time = 0, how do I get delx to then take the outputted values x(1) and x(2), choose x(1) and then put this value into my delx function in order to get a new delx value, and to continue this loop until the final time value?
I.e
Initial Values --> delx value --> ode45 for time = 0:0.01:10 until finish --> takes outputted x(1) from ode45 --> Back to delx value step
Any help is much appreciated.
No products are associated with this question.
1 Comment
Direct link to this comment:
http://mathworks.com/matlabcentral/answers/45354#comment_95213
Do you want to calculate delx during the integration or afterwards using the output of ODE45? For the later case, what is the problem?