A collection of modular MATLAB scripts implementing core numerical analysis algorithms for solving engineering problems.
Numerical solution of a Cauchy-Dirichlet problem for a parabolic PDE using a non-complete Fourier Series expansion.
The repository is structured to be simple and modular.
The labs directory contains the main lab scripts (Lab*.m), each corresponding to a specific topic or problem set.
The core logic is housed in the functions/ directory, which contains a set of reusable MATLAB functions.
Key implemented algorithms include:
- Root-finding: Bisection, Newton's method, Fixed-point iteration.
- Linear Systems: Thomas algorithm for tridiagonal systems, Forward/Backward substitution.
- Eigenvalue Problems: Power method and Inverse power method.
- Numerical Integration: Composite Trapezoidal and Simpson's rules.
- ODEs: Euler (forward and backward), Heun, Crank-Nicolson, and a general Theta-method implementation.
- PDEs/Finite Elements: Solvers for diffusion and reaction-diffusion problems using Finite Element methods.
- Iterative Methods: Richardson, Gradient method.
The img/ directory contains plots and diagrams generated from the lab scripts, visually representing the results of the simulations.
To run these scripts, you will need a working installation of MATLAB or GNU Octave.
Simply clone the repository and navigate to the labs directory to execute the lab scripts.
You will also need to add the functions/ directory to your MATLAB path to ensure that all functions are accessible.
addpath('functions');The scripts produce a variety of numerical solutions, often visualized as plots. Here are a couple of examples from the collection.
Numerical integration of a satellite trajectory under the influence of Earth's gravity and hypothetical air resistance.
A simulation of a Susceptible-Exposed-Infected-Recovered (SEIR) model, a common model in epidemiology.
A simple application of the Galerkian method to a linear elastic element.
Have a nice coding day,
Tommaso 🐼


