pass output between two ode15s

hello
I want to pass output from ode15s in any time step. for example I have two function
xdot2+xdot=Vo (function1)
Vodot+Vo=x+sin(t) (function2)
I doesn't want to use 1 ode15s and combine my function.I want to use 2 ode15s
in time step t(i) must be calculate x(i) is 1th ode15s
[x,t]=ode15s(function1,[tspan],x0)
then call back this x(i) to 2th ode15s to calculate Vo(i)
[Vo,t]=ode15s(function2,[tspan],x0)
and iterate this procedure to t(end)
Would you please help me how can I do this?

2 Comments

And why don't you want to solve for x and Vo simultaneously ?
Best wishes
Torsten.
actually i have second orde ode and i want to solve 1st ode using neamark algorithm. i have large sparse matrix ode for example 20000*20000.when i want to use ode15s for solution i must convert second orde ode to first order ode and this would be 40000*40000.so ode15s has out of memory

Answers (0)

This question is closed.

Asked:

on 8 Jan 2015

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!