ode step

2 次查看(过去 30 天)
pawan kumar
pawan kumar 2011-10-17
is it possible to store value in a matrix other than equations in odesolver,if any variable which is getting change in each step and being used in equation
  1 个评论
Jan
Jan 2011-10-17
I do not understand the question. Can you post the relevant code and mark, what you want to save?

请先登录,再进行评论。

回答(1 个)

Matt Tearle
Matt Tearle 2011-10-17
Do you mean something like an internal variable in the rate equations? Not exactly. But why would you need this? The ode rate equations are defined in terms of t and y (and any additional parameters), so any calculations performed internally can always be reproduced after the fact. If you need to track this in order to halt execution, you can use and event (see the documentation: MATLAB -> User's Guide -> Mathematics -> Calculus -> Ordinary Differential Equations and go to Examples -> Event Location)
You can also define the 'OutputFcn' property using odeset

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by