A comprehensive collection of MATLAB functions for numerical analysis, organized by mathematical method categories.
NAMF is a collection of MATLAB implementations of fundamental numerical analysis algorithms, developed for educational and research purposes. The functions cover three main areas:
- Quadrature Formulas: Numerical methods for computing definite integrals
- Root Finding: Iterative algorithms for finding function zeros
- Linear Systems: Direct and iterative methods for system solving
NAMF/
├── Quadrature_Formulas/ # Numerical integration methods
├── Root_Finding/ # Root finding algorithms
├── Linear_Systems/ # Linear system solving
│ ├── Factorizations/ # Factorization methods
│ └── Iterative_Methods/ # Iterative methods
├── LICENSE
└── README.md
Methods to estimate definite integral values without computing the antiderivative:
| Function | Description |
|---|---|
trap_comp_integr_dop.m |
Double integration with composite trapezoids |
NewCot_chiu_semp.m |
Simple closed Newton-Cotes |
NewCot_chiu_comp.m |
Composite closed Newton-Cotes |
NewCot_aper_semp.m |
Simple open Newton-Cotes |
NewCot_aper_comp.m |
Composite open Newton-Cotes |
NCcc_Num_iter.m |
Newton-Cotes iteration number calculation |
NewCot_chiu_semp_pol_carat.m |
Simple closed Newton-Cotes for characteristic polynomial |
Iterative algorithms to find α ∈ [a,b] such that f(α) = 0:
| Function | Description |
|---|---|
Bisect.m |
Bisection method |
rad_newton_vett.m |
Vectorial Newton method |
rad_pol_newton.m |
Newton method for polynomials |
Horner.m |
Horner's algorithm |
Frobenius.m |
Frobenius method |
rad_minmax.m |
Min/max root search |
max_iter_trapezi.m |
Maximum iterations for trapezoidal rule |
newton_mat_trid_sim.m |
Newton method for symmetric tridiagonal matrix eigenvalues |
val_pol_carat_trid.m |
Characteristic polynomial evaluation for tridiagonal matrices |
| Function | Description |
|---|---|
Fatt_LU.m |
LU factorization with pivoting |
Fatt_LU_NOPIV.m |
LU factorization without pivoting |
Fatt_QR.m |
QR factorization |
| Function | Description |
|---|---|
Jacobi.m |
Jacobi method |
GaussSeidel.m |
Gauss-Seidel method |
| Function | Description |
|---|---|
RSL_SI.m |
Lower triangular system solving (forward substitution) |
RSL_SA.m |
Upper triangular system solving (backward substitution) |
RisolSisMatTrid.m |
Tridiagonal matrix system solving |
-
Clone the repository:
git clone https://github.com/username/NAMF.git
-
Add to MATLAB path:
addpath(genpath('path/to/NAMF')) -
Use the functions:
% Example: Bisection method f = 'x^2 - 2'; [x, fx, n] = Bisect(f, 0, 2, 1e-6); % Example: Iterative methods A = [4 -1; -1 4]; b = [1; 2]; x0 = [0; 0]; [x, iter] = Jacobi(A, b, x0, 1e-6, 100);
-
Run tests:
NAMF_tests % Run comprehensive test suite
% Double integral with composite trapezoids
f = @(x,y) x.*y + sin(x.*y);
result = trap_comp_integr_dop(0, 1, 0, 1, 10, 10, f);% Bisection to find √2
f = 'x^2 - 2';
[root, fval, iter] = Bisect(f, 1, 2, 1e-10);
fprintf('√2 ≈ %.10f (iterations: %d)\n', root, iter);% LU factorization
A = [4 3; 6 3];
[L, U] = Fatt_LU(A);Contributions are welcome! To contribute:
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is distributed under the MIT License. See the LICENSE file for more details.
Note: This project is developed for educational and research purposes in numerical analysis.