Bug (kind-of) in randn()
by Arvind
21 Nov 2008
The first number generated by randn() after a seed-reset is always positive!
|
Watch this File
|
| File Information |
| Description |
This is a very strange bug in randn(). After every seed-reset, the first call to randn() almost invarably produces a postive number. Most of the time this is a benign defect, but sometimes folks seek to make a random sequence of 1s and 0s using randn>0. If you tried to do this, and reset the seed between every call to randn, then you will get a long sequence of ones. Not random! |
| MATLAB release |
MATLAB 7.4 (R2007a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us at files@mathworks.com