Statistics Toolbox    

Random Numbers in Examples

The random number generation functions for various probability distributions are based on the primitive functions, randn and rand. There are many examples that start by generating data using random numbers. To duplicate the results in these examples, first execute the commands below.

You might want to save these commands in an M-file script called initseed.m. Then, instead of three separate commands, you need only type initseed.


  Primary Topic Areas Mathematical Notation