MATLAB code for 1D Multigrid algorithm

Multigrid (MG) methods belong to the best known algorithms for solving some class of PDEs.This code gives a MATLAB implementation of 1D Multigrid algorithm for solving a two-point ODE boundary value problem. Compared with existing online codes, my code tries to balance well between efficiency and readability (simplicity) for practical and wide use.

More online codes: