Source: https://manuel.marcoux.pagesperso-orange.fr/Enseignement/Matlab/tp01.pdf