A collection of MATLAB implementations for common numerical methods.
- Newton-Raphson Method (
newtonRaphson.m)- Finds roots of equations using the Newton-Raphson iterative method
- Example: Solving
x^3 - x - 2 = 0
- Lagrange Interpolation (
lagrange.m)- Polynomial interpolation using Lagrange polynomials
- Example with 7 data points
- Least Squares Linear Regression
- Option I (
leastSquaresOptionI.m): Direct formula implementation - Option II (
leastSquaresOptionII.m): Matrix form solution - Example with sample data points
- Option I (
Each MATLAB script can be run independently. Simply execute any .m file in MATLAB to see the method in action with the provided example data.