Time-based integration of ODEs
이전 댓글 표시
Hello everyone. I have a problem that I hope I can get some help on. So I have the following set of differential equations:
I need to solve for θ, ϕ, and ψ from those three differential equations. To be specific I need to solve for a value (not a function) of θ, ϕ, and ψ at a given moment. I have a for loop that runs, and at each iteration the value of p, q, and r change, so at each iteration I will need to do this integration and solve for a value of θ, ϕ, and ψ. What information do I have avaliable for me? The value of p, q, and r at each iteration, and I also know the initial values (iteration = 1) of θ, ϕ, and ψ, and finally, I know the time at each iteration as well. Is this possible in MATLAB? I tried implementing this with ODE45 and struggled very much. Any help is super appreciated.
댓글 수: 6
Davide Masiello
2023년 1월 13일
This seems like a very standard problem and could be solved easily in MatLab.
I suggest you post your code so that we can suggest what to change/improve.
Star Strider
2023년 1월 13일
What actually defines an ‘iteration’?
Do the ‘tspan’ limits change in each iteration? If so, how are they defined?
Are p, q, and r defined as function results (and if so, what is the argument to the function) or are they elements of vectors?
Jan
2023년 1월 13일
@Ali Almakhmari: What does "each iteration" mean? Are p,q,r functions of the time? If not, how are they defined?
Ali Almakhmari
2023년 1월 13일
It is still not clear, what you call "iteration". ODE45 solves the ODE in steps, so this is an iterative process. But steps can be rejected or re-calculated, such that "changes in each iteration" are not meaningful. If p,q,r are functions of time, there is no problem.
Please post the existing code, even if it fails. Then it might get clear immediately, how p,q,r are defined.
Ali Almakhmari
2023년 1월 13일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


