64 this =
this@solvers.BaseCustomSolver;
66 this.
Name=
" Explicit forward euler ";
91 dt =
t(2:end)-
t(1:end-1);
97 ed = solvers.SolverEventData;
100 effsteps = length(outputtimes);
102 x = [x0 zeros(size(x0,1),effsteps-1)];
109 hlp = dt(idx-1)*odefun(
t(idx-1),oldx);
121 if outputtimes(outidx) == idx
126 this.
notify(
" StepPerformed ",ed);
notify
Broadcast a notice that a specific event is occurring on a specified handle object or array of handle...
logical RealTimeMode
Determines if the solver's StepPerformed event should be used upon solving instead of returning the f...
BaseCustomSolver: Base class for all self-implemented solvers.
virtual function M = evaluate(double t,colvec< double > mu)
ExplEuler(double MaxStep)
Constructor for the explicit euler solver.
A MatLab function handle.
solvers.SolverTypes SolverType
The type of the solver.
Explicit forward euler ODE solver.
double MaxStep
Maximum time step for solver.
dscomponents.AMassMatrix M
The mass matrix of the ODE .
function matrix x = customSolve(function_handle odefun,rowvec t,colvec x0,rowvec< integer > outputtimes)
Solves the ODE using the explicit Euler method.