Give Output of one ODE to the another ODE simultaneously

I have the equations as follows
and
What I have to do is integrate and supply the output to sumlatenously at each time step as gets integrated and this must happen in a speciafic time inteval.
Is there a way to do in code?
Eg - If gets integrated from 0 to witha a constant θ and at time , the value of theta must be taken from intgrated . This must happen simultaneously.

Answers (1)

Use the "Nonstiff Euler Equations" example on this documentation page as a model for your ODE function.

3 Comments

Thanks for the reply Steven. My problem is not which ODE to use. There is a kind of feedback from second equation to the first. Integrating separately is not a trouble but first is dependent on second so I have to do kind of simultaneous integration but the second must be integrated and the output should be given to the first at each time step
You have a system of two differential equations. Solve them simultaneously just like that example solves three differential equations simultaneously.
Your theta equation is independent of x, so you could integrate this separately (in fact, it has an analytical solution), then use the result in the x integration routine.

Sign in to comment.

Products

Release

R2020a

Tags

Asked:

on 11 Oct 2020

Commented:

on 12 Oct 2020

Community Treasure Hunt

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

Start Hunting!