Give Output of one ODE to the another ODE simultaneously
3 次查看(过去 30 天)
显示 更早的评论
I have the equations as follows
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377616/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377621/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377626/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377631/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377631/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377631/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377646/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377651/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/377626/image.png)
0 个评论
回答(1 个)
Steven Lord
2020-10-12
Use the "Nonstiff Euler Equations" example on this documentation page as a model for your ODE function.
3 个评论
Steven Lord
2020-10-12
You have a system of two differential equations. Solve them simultaneously just like that example solves three differential equations simultaneously.
Alan Stevens
2020-10-12
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!