Accessing ODE solver solutions in between the time steps
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
另请参阅
类别
在 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!