MATLAB code¶
This primitive example just shows how to document MATLAB code with Sphinx using the matlabdomain extension.
MyModule¶
MyModule module contains a function
which implements the explicit Euler method:
- MyModule.Forward_Euler(vector_field, initial_condition, h, duration)¶
Forward Euler time integrator
- Parameters:
vector_field – right hand side of the ODE
initial_condition – initial condition
h – time step size
duration – duration of simulation
- Returns:
time grid, discrete trajectory
The module further contains an example script:
- MyModule.main¶
An example showing how to use the Forward_Euler function.