Skip to content

abdullahkhfbII/matlab-numerical-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB Numerical Methods

A collection of MATLAB implementations for common numerical methods.

Methods Included

1. Root Finding

  • Newton-Raphson Method (newtonRaphson.m)
    • Finds roots of equations using the Newton-Raphson iterative method
    • Example: Solving x^3 - x - 2 = 0

2. Interpolation

  • Lagrange Interpolation (lagrange.m)
    • Polynomial interpolation using Lagrange polynomials
    • Example with 7 data points

3. Curve Fitting

  • Least Squares Linear Regression
    • Option I (leastSquaresOptionI.m): Direct formula implementation
    • Option II (leastSquaresOptionII.m): Matrix form solution
    • Example with sample data points

Usage

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.