jingju11 发表于 2013-5-3 08:11 
One more reason for the problem, is the function won't take characters as its arguments although y ...
Thanks! The idea that input fractions as characters solves my problem indeed('_temorary_' is very useful!). But I recognize code like "a =rantbl(123,.1,1/2,1/3,1/15);" can be read as well .
By the way, can rantbl() generate several radom numbers, instead of one number at a time? I need different numbers in one repeat...