Matlab files
Here you can find some mfiles 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 userdefined 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:
 Twopoint forward difference formula for first derivative: d1fd2p.m
 Threepoint centereddifference formula for first derivative: d1cd3p.m
 Threepoint centereddifference formula for second derivative: d2cd3p.m
 Twopoint forward difference formula for first derivative, varying h: d1fd2p_varh
 Threepoint centereddifference formula for first derivative, varying h: d1cd3p_varh.m
 Threepoint centereddifference formula for second derivative, varying h: d2cd3p_varh.m
Composite NewtonCotes rules for numerical integration:
More advanced algorithms for numerical integration:
Equation solvers:
 A simple implementation of Newton's method: newton.m
 A simple implementation of the secant method: secant.m
