Source: https://www.math.u-bordeaux.fr/~ayger/MATLABSignal/Tutorials/TutMatlab.pdf