Source: https://engineering.purdue.edu/VISE/ee438L/matlab/help/pdf/random.pdf