ODE45 Iterations details

조회 수: 11 (최근 30일)
Suhaib Salah
Suhaib Salah 2022년 11월 13일
댓글: Suhaib Salah 2022년 11월 14일
Dear Matlabers,
I worked previously on Optimization Algorithms (Built-in ones). And there were built-in functions to know what is going on for every iteration, and what is the error.
Similarly, I want to know what are the output for every ode45 iteration. How can I?
i0 = [0 0 0 0];
[t, sol] = ode45(fun,[0 20], i0);
Thanks in advance

답변 (1개)

Torsten
Torsten 2022년 11월 13일
편집: Torsten 2022년 11월 13일
Display time and sol values either in a function "OutputFcn" or - quick and dirty - directly in "fun" during the solution process.
Concerning "OutputFcn", read the documentation for options of ode45.
  댓글 수: 3
Steven Lord
Steven Lord 2022년 11월 14일
The "Summary of ODE Examples and Files" section of this documentation page lists various examples included in MATLAB and the options that those examples use. The ballode and orbitode examples indicate they use the OutputFcn option. I would start by reading through those examples and trying to understand them.
Suhaib Salah
Suhaib Salah 2022년 11월 14일
Thanks Steven. I will start doing this.
Best!

댓글을 달려면 로그인하십시오.

카테고리

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