  rand
  Builtin Function



      SSyynnooppssiiss
        Random number generator.

      SSyynnttaaxx
        rand ( )

        rand ( _n_r_o_w, _n_c_o_l )

        rand ( _D_T_Y_P_E, _D_1 )

        rand ( _D_T_Y_P_E, _D_1, _D_2 )

      DDeessccrriippttiioonn


        rraanndd(())
           produces a random scalar.


        rraanndd (( _X ,, _Y ))
           produces a randomly generated MATRIX with row dimension _X,
           and column dimension _Y.


        rraanndd (( _D_T_Y_P_E ,, ...... ))
           changes the distribution used when generating random numbers.
           The value of _D_T_Y_P_E determines the subsequent parameters.


        Types of distributions:



        rand (
           Sets the generator to return a random deviate from the beta
           distribution with parameters A and B.  The density of the
           beta is



             x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1






        rand (
           Sets the generator to return a random deviate from the
           distribution of a chi-square with DF degrees of freedom
           random variable.


        rand (
           Sets the generator to return a random deviate from an
           exponential distribution with mean AV.


        rand (
           Sets the generator to return a random deviate from the F
           (variance ratio) distribution with DFN degrees of freedom in
           the numerator and DFD degrees of freedom in the denominator.


        rand (
           Sets the generator to return a random deviate from the gamma
           distribution whose density is:



             (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X)






        rand (
           Sets the generator to return a random deviate from the
           distribution of a noncentral chi-square with DF degrees of
           freedom and noncentrality parameter XNONC.


        rand (
           Sets the generator to return a random deviate from the
           noncentral F (variance ratio) distribution with DFN degrees
           of freedom in the numerator, and DFD degrees of freedom in
           the denominator, and noncentrality parameter XNONC.


        rand (
           Sets the generator to return a random deviate from a normal
           distribution with mean, _A_V, and standard deviation, _S_D.


        rand (
           Sets the generator to return a uniform double between LOW and
           HIGH.


        rand (
           Returns a single random deviate from a binomial distribution
           whose number of trials is N and whose probability of an event
           in each trial is P.


        rand (
           Sets the generator to return a random deviate from a Poisson
           distribution with mean AV.


        rand (
           Resets the random number generator to the default generator,
           which generates a distributed random variable in the interval
           0 -> 1. The interval endpoints are not returned.


        Examples:









     > rand()
            0.368
     > rand(4)
      vector elements 1 thru 4
            0.983       0.535       0.766       0.646
     > rand(3,3)
      matrix columns 1 thru 3
            0.767       0.152       0.347
             0.78       0.625       0.917
            0.823       0.315        0.52

     > rand("norm", 10.0, 2.0 );
     > rand(10)
      vector elements 1 thru 5
             9.86        11.8        12.1        7.35        8.76
      vector elements 6 thru 10
             10.5        7.44        11.1        6.93        9.87





     rand uses the RANLIB library, authored by B. W. Brown and J. Lovato
     under grant CA-16672 from the National Cancer Institute.


     SSeeee AAllssoo
        srand






































