a matlab code for generating 1-D random numbers according to specific analytic probability function.