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
.
Note
For rand and randn , the 'seed' syntax is replaced by the 'state' syntax in MATLAB Version 5. Although use of the 'seed' syntax is backward compatible in MATLAB Version 6.5, you should avoid its use. This book will be updated to use the 'state' syntax in a future release.
|
![]() | Primary Topic Areas | Mathematical Notation | ![]() |