Source: https://www.ljll.math.upmc.fr/~joly/mattex/Matlab1.pdf