ODE45- How to pass parameters out
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, Can anyone tell me how I can pass parameters out of a ODE when they are not being calculated as part of the differential equation but are subsidiary values. Wha I want to do is write them out at the end of a successful timestep (i.e. not get the values calculated with trial time step sizes)?
Is there a clever way to use global to do this?
댓글 수: 0
답변 (1개)
Richard Brown
2012년 5월 2일
Why don't you just solve your ODE first, and then call the RHS function, modified to print out your parameters of interest, at the timestep values?
댓글 수: 1
Jan
2012년 5월 3일
There is no reliable way to check inside the ODE function, if a step is a trial or accepted step. Function evaluations can be used to find event values also.
참고 항목
카테고리
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!