File Exchange

image thumbnail

RANDI_ORG: True random integer numbers

version 1.5.0.0 (3.51 KB) by Giampiero Salvi
Queries www.random.org to collect true random integer numbers.

4 Downloads

Updated 18 Jun 2010

View License

The RANDI_ORG function has a similar usage as the RANDI function. However, instead of returning pseudo-random numbers, it queries the site http://www.random.org to collect true random numbers. Refer to the web site for a discussion on the difference between pseudo and true randomness.

Note that http://www.random.org allows limited traffic per day, check the site for more details.

Cite As

Giampiero Salvi (2020). RANDI_ORG: True random integer numbers (https://www.mathworks.com/matlabcentral/fileexchange/27849-randi_org-true-random-integer-numbers), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Thanks for the feedback! Now the function uses urlread and there's a warning about limited traffic from www.random.org.

Oleg Komarov

API: http://www.random.org/clients/http/

An example: http://www.random.org/sequences/?min=1&max=52&col=1&format=plain&rnd=new

I think this method will be feasible through platforms.

Oleg

Jan

Did you try URLREAD to get the values?
It is necessary to mention the guidelines of the web service, which involve a quota of 2e5 bits per day, which accumulates to upto 1e6 bits, per TCP/IP. If the quota is exceeded, stop requesting new values. Get values in as large chunks as possible, because requesting single numbers produces large traffic on the server.
Thanks, Jan

Simon Cross

This looks like a very useful functions for a lot of my projects which rely on'random' numbers and I would prefer them to be really random, so many thanks for posting it. Unfortunately when I run it I get the following error message:

??? Undefined function or variable 'a'

Error in ==> randi_org at 61
if any(a<+0)

I am running it in Mac OSX Leopard

Thanks for your help

Simon Cross

Updates

1.5.0.0

- fixed random.org limitation of 10000 numbers per query

1.4.0.0

- without arguments checks for quota at www.random.org

1.3.0.0

- removed dependencies on curl (using urlread instead)
- added warning about limited traffic from www.random.org

1.2.0.0

- fixed small bug

1.1.0.0

- fixed examples in the help text
- fixed handling of negative sizes

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

randi_org/