How to solve two differential equation systems sequentially?
7 views (last 30 days)
Show older comments
I have two differential equation systems. Solving procedure should start with the first one and solve it with a initial condition. Then, when the solution reaches a threshold, it should switch to the second system and used the final states of the first system as initial conditions of the second system. I have modeled both systems in Simulink. How can I linked them together properly? I used switches and if but it didn't work properly.
1 Comment
Walter Roberson
on 14 Jun 2016
If you were doing it at the MATLAB level, I would suggest using event functions to detect that the threshold had been reached and terminate the first ode.
Answers (1)
Ruwini
on 15 May 2025
๐๐^๐ฅ/๐๐ก= โ|๐|^1/2*๐2^2*๐^๐ฅโ๐๐๐^๐ฆ/๐๐โ๐^๐ฅ/2๐1=0 (1)
๐๐^๐ฆ/๐๐ก= โ|๐|^1/2*๐2^2*๐^๐ฆ+๐๐๐^๐ฅ/๐๐โ๐^๐ฆ/2๐1+๐บ๐
๐^๐ง=0 (2)
๐๐^๐ง/๐๐ก= โ|๐|^1/2^๐2^2*๐๐งโ๐บ๐
*๐^๐ฆโ๐^๐ง/๐1=0 I want ode45 MATLAB code for solving this
1 Comment
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!