5.0

5.0 | 1 rating Rate this file 36 downloads (last 30 days) File Size: 1.83 KB File ID: #21353

True Random Integer Generator

by Ameya Deoras

 

05 Sep 2008 (Updated 05 Sep 2008)

Code covered by BSD License  

Download true (not pseudo-) random numbers from random.org's generator

Download Now | Watch this File

File Information
Description

The function TRUERAND returns truly random integers using random.org's Random Integer Generator. According to random.org, the numbers are generated based on atmospheric noise and skew-corrected to generate uniform numbers. The generated numbers have been shown to pass the NIST tests for RNGs.

The range of numbers is -1e9 to 1e9 and the maximum number of values that can be generated is 10,000

USAGE:
truerand(rows,cols,min,max) returns a matrix of size rows-by-cols with random integers between min and max.

truerand(n,min,max) returns an n by 1 vector

truerand(n, m), truerand(n) and truerand use the default values min = 1, max = 100

EXAMPLES:
 y = truerand
 y = truerand(9)
 y = truerand(6,6)
 y = truerand(5,1,20)
 y = truerand(3, 4, 15, 30)

For more information visit random.org

MATLAB release MATLAB 7.6 (R2008a)
Other requirements The function requires an internet connection (it relies on URLREAD).
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
14 Sep 2009 Ilya Valmianski

Very nice

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mathematics Ameya Deoras 22 Oct 2008 10:17:57
general Ameya Deoras 22 Oct 2008 10:17:57
random integer Ameya Deoras 22 Oct 2008 10:17:57
generator Ameya Deoras 22 Oct 2008 10:17:57
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com