Numerical Computations in MATLAB: Video Course
A guided MATLAB course covering equations, matrices, interpolation, integration, polynomials, differential equations and optimization, with links to all seven chapters.

On this page
Learn to solve equations, work with matrices, fit data, integrate functions and simulate differential equations with MATLAB. This course connects the mathematical ideas to short examples using MATLAB’s numerical functions. Mostapha Kalami Heris teaches the course on the Yarpiz YouTube channel.
The course has 22 videos, about 4 hours and 27 minutes in total, grouped into seven chapters. Each video takes one MATLAB function or group of functions, explains the math behind it briefly, and then solves small examples live in MATLAB. Each chapter also has its own page on Yarpiz with a detailed summary of its videos.
Watch online
The 22 sections of this course are available on YouTube and are embedded here as a playlist.
What the course covers
1. Root finding and equation solving
The first chapter solves equations of the form . It finds all roots of a polynomial with roots, one root of a nonlinear equation with fzero (and shows why the starting point matters), a system of nonlinear equations with fsolve, and a system of linear equations with linsolve and the backslash operator. Chapter page: Root Finding in MATLAB.
- Finding roots of polynomials using roots (YouTube (opens in a new tab))
- Finding roots of nonlinear functions using fzero (YouTube (opens in a new tab))
- Solving systems of nonlinear equations using fsolve (YouTube (opens in a new tab))
- Solving systems of linear equations using linsolve (YouTube (opens in a new tab))
2. Eigenvalues, eigenvectors and SVD
This chapter computes eigenvalues and eigenvectors with eig, checks that the eigenvalues’ product equals the determinant and their sum equals the trace, and diagonalizes a matrix with independent eigenvectors as . It then computes the singular value decomposition for real matrices with svd and uses a low rank approximation to compress an image. Chapter page: Eigenvalues and Eigenvectors in MATLAB.
- Eigenvalues and Eigenvectors (YouTube (opens in a new tab))
- Singular Value Decomposition (YouTube (opens in a new tab))
3. Interpolation and curve fitting
This chapter fits polynomials to noisy data with polyfit and polyval, interpolates data in one or more dimensions with interp1 to interpn, interpolates periodic data in the frequency domain with interpft, builds smooth paths with cubic splines, and interpolates scattered data in 2D and 3D with griddata. Chapter page: Interpolation and Curve Fitting in MATLAB.
- Polynomial Fitting using polyfit (YouTube (opens in a new tab))
- Interpolation using interp1 to interpn (YouTube (opens in a new tab))
- Interpolation using interpft (YouTube (opens in a new tab))
- Interpolation using Cubic Splines (YouTube (opens in a new tab))
- Interpolation using griddata in 2D and 3D Spaces (YouTube (opens in a new tab))
4. Numerical integration and differentiation
This chapter computes integrals of functions with integral and quadgk, including improper integrals, error tolerances and contour integrals in the complex plane. It continues with double and triple integrals (integral2, quad2d, integral3), then integrates sampled data with sum, cumsum, trapz and cumtrapz. It ends with derivatives of sampled data using diff, gradient and del2. Chapter page: Integration and Differentiation in MATLAB.
- Numerical Integration using integral and quadgk (YouTube (opens in a new tab))
- Double and triple integrals (YouTube (opens in a new tab))
- Discrete integrals and summations (YouTube (opens in a new tab))
- Numerical Differentiation (YouTube (opens in a new tab))
5. Working with polynomials
A single video reviews the polynomial functions of MATLAB, using the coefficient vector form: evaluation with polyval, roots and poly, fitting with polyfit, multiplication and division with conv and deconv, and exact derivatives and integrals with polyder and polyint. Chapter page: Working with Polynomials in MATLAB.
- Working with Polynomials (YouTube (opens in a new tab))
6. Differential equations
This chapter solves initial value problems with ode45 and the other nonstiff and stiff solvers, using the van der Pol oscillator and the Lorenz system as examples. It then solves boundary value problems with bvp4c and bvpinit, and delay differential equations with dde23, ddesd and ddensd. Chapter page: Numerical Solution of Differential Equations in MATLAB.
- Solving Ordinary Differential Equations (YouTube (opens in a new tab))
- Solving Boundary Value Problems (YouTube (opens in a new tab))
- Solving Delayed Differential Equations (YouTube (opens in a new tab))
7. Optimization
The last chapter solves linear and mixed integer linear programs with linprog and intlinprog, a quadratic program with quadprog, and nonlinear problems with fminbnd, fminsearch, fminunc and fmincon. The examples include the Rosenbrock function and the design of a box with the largest volume for a given surface area. Chapter page: Optimization in MATLAB.
- Linear Programming and Mixed-Integer LP (YouTube (opens in a new tab))
- Quadratic Programming (YouTube (opens in a new tab))
- Constrained and Unconstrained Nonlinear Optimization (YouTube (opens in a new tab))
Who it is for
The course suits applied math, science and engineering students, and anyone who needs numerical methods in MATLAB. It assumes basic math and calculus, some background in numerical methods, and basic MATLAB programming. Some functions, such as fsolve, linprog, quadprog and fmincon, need Optimization Toolbox.
How to study the course
Start with the root finding chapter if you are new to the numerical tools. Follow the chapter order above, or choose the chapter that matches your problem. The chapter list is a study guide, and the master YouTube playlist may use a different order for its first two videos.
Run each small example before changing its inputs. Check a solver’s result against the original equations, inspect the shape of matrix outputs and compare numerical approximations at more than one tolerance or step size. The videos use an older MATLAB release, so function options and plots may differ in your installation.
Related tutorials on Yarpiz
- Numerical Root Finding Methods in Python and MATLAB: the bisection, secant and Newton-Raphson methods.
- Runge-Kutta Method in Python and MATLAB.
- Linear Programming in MATLAB, with the transportation problem.
- Least Squares in Python, JavaScript and MATLAB.
How to cite
If you use this code or tutorial in your work, articles or publications, please cite it.
Mostapha Kalami Heris, Numerical Computations in MATLAB: Video Course (572), Yarpiz, 2019. https://yarpiz.com/numerical-computations-in-matlab-video-tutorial-572@misc{yarpiz-572,
author = {{Mostapha Kalami Heris}},
title = {{Numerical Computations in MATLAB: Video Course}},
howpublished = {Yarpiz},
year = {2019},
note = {Code 572},
url = {https://yarpiz.com/numerical-computations-in-matlab-video-tutorial-572}
}Published Updated

Comments