フィルターのクリア

Accessing ODE solver solutions in between the time steps

6 ビュー (過去 30 日間)
Saurav Kumar
Saurav Kumar 2016 年 5 月 17 日
回答済み: Walter Roberson 2016 年 5 月 17 日
How can I access the solution of the odesolver in between the time steps before it returns the full solution. For ex: The function definition is :
function yf = odefunc(t,x_i)
yf(1,1) = x_i*exp(-t);
end
When I type
[t,y]=ode45('odefunc',[0 5],-3)
in the command window, it returns me two vectors t and y of size say (45 x 1). I want to access the solution of the odesolver that is say 5 values of each ('t' and 'y') inside the function before the odesolver spits out the entire solution.

回答 (2 件)

Steven Lord
Steven Lord 2016 年 5 月 17 日
Are you trying to use the values from previous time steps to calculate the solution at the current time step? If so, take a look at the delay differential equation solvers in MATLAB like dde23 or ddesd.

Walter Roberson
Walter Roberson 2016 年 5 月 17 日
You cannot do that with the ode* functions.

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by