Allen's Random Matlab Functions