RANDRAW
Efficient Random Variates Generator (from over 50 distributions).
Author: Alex Bar-Guy
I'm not sure if anyone has pointed it out, but binomial seems to have a bug:
You define switchflag within a if-else clause in line 881, but it needs to be defined outside it, since, after the clause, you write:
Line 935: if switchFlag
Did old versions of Matlab support use of variables outside what's meant to be their scope?