Feeding the output of the ODE solver into another script.
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm using the ODE45 to solve a system, which is giving me a n by 6 matrix of values. I would like to take the last row of values and feed that into another script, but don't know how to name it or reference it in the other script. How can I do this?
답변 (1개)
Walter Roberson
2017년 2월 17일
This is the sort of reason you use functions instead of scripts.
Your existing second script has a variable name that it expects the input to be stored in. Assign the last row of values from the ode45 solutions into that variable name.
댓글 수: 2
Walter Roberson
2017년 2월 18일
Star Strider links to the documentation on "end", which is appropriate.
TheResults(end,:)
This is equivalent to
TheResults( size(TheResults,1), :)
참고 항목
카테고리
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!