MATLAB lessons N.2

All MATLAB file for the lesson in a unique archive lesson2.zip

Exercise on MATLAB ode solver

Example of ODE solver of MATLAB

File ode1.m

output of the command:

../../_images/test1.jpg

Changing tolerance parameters:

File test2.m

this is the output of the command

../../_images/test2.jpg

File test3.m

this is the output of the command

../../_images/test3a.jpg

and this

../../_images/test3b.jpg

Numerical ODE solver with constants step size

This routine are taken from mathworks

First order explicit Euler:

File ode1.m

Second order explicit Runge Kutta:

File ode2.m

3rd order explicit Runge Kutta:

File ode3.m

4th order explicit Runge Kutta:

File ode4.m

5th order explicit Runge Kutta:

File ode5.m

Checking the order

Graphical plot of the order:

File ode_test.m

Numerical estimation of the order:

File ode_check_error.m

output of command ode_test

../../_images/ode_test.jpg