How to extract the internal time discretization of the solver PDEPE.

1 次查看(过去 30 天)
For a give time discretization, How can I extract the internal time discretization of PDEPE?
This is easy with ODE45. But since it is internal to PDEPE, I would like to know if I can still set the internal discretization of the time as an output (i.e. not exactly tspan).
Thanks.

回答(1 个)

Torsten
Torsten 2017-5-12
Use "OutputFcn" in the "options" structure.
"OutputFcn" will then be called after each successful time step.
Best wishes
Torsten.
  2 个评论
assionvi  hove kouevi
Hi,
How can this records(not displays) the successful time step and save it as an output of PDEPE?
For example [sol, t_successful] = pdepe(.....), where t_successful represent all the successful time step of the internal ODE45
Thanks.
Torsten
Torsten 2017-5-12
编辑:Torsten 2017-5-12
"OutputFcn" is a function that you define and which is called after each successful time step of "pdepe". The actual time is passed to this function. So all you have to do is to save the value of this variable "t" to a file.
Best wishes
Torsten.

请先登录,再进行评论。

类别

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