Matlab files

Here you can find some m-files that are not posted in 'Lectures' part, as well as the existing m-files with commentaries. To see the commentary, type

>> help filename

in Matlab command window. (here 'filename' should be replaced by actual name, for instance, midp).

Disclaimer: These files are provided "as is", without warranties of any kind.

Here is a user-defined function, which can be modified and used as an input to the numerical integration or differentiation subroutines below: myfunc.m

Finite difference formulas for numerical differentiation:

Composite Newton-Cotes rules for numerical integration:

More advanced algorithms for numerical integration:

Some fixed-stepsize Runge-Kutta type solvers for initial value problems:

One step at a time:

Some examples of modeling and simulation by IVPs:

Variable step-size (aka adaptive) methods:

Implicit methods:

Equation solvers:

Multistep methods:

Shooting methods for 2nd order (Dirichlet) boundary value problems:

Finite difference methods for 2nd order (Dirichlet) boundary value problems: