RandStream.list
R2026bList available random number generator algorithms
Description
RandStream.list displays a list of all available generator
algorithms that can be used to create a random number stream using RandStream or RandStream.create.
Examples
Since R2026b
To return a table of all available generator algorithms, use
RandStream.list with an output argument.
T = RandStream.list
T =
11×3 table
Name MultiStream Description
_______________ ___________ ______________________________________________________________________________
dsfmt19937 "simdTwister" false "SIMD-oriented Fast Mersenne Twister with Mersenne prime 2^19937-1"
mcg16807 "v4" false "Multiplicative congruential generator, with multiplier 7^5, modulo 2^31-1"
mlfg6331_64 "multFibonacci" true "Multiplicative lagged Fibonacci generator, with lags 63 and 31, 64 bit"
mrg32k3a "combRecursive" true "Combined multiple recursive generator"
mt19937ar "twister" false "Mersenne Twister with Mersenne prime 2^19937-1"
pcg64dxsm "pcg" true "64-bit Permuted Congruential Generator with double xor-shift multiply"
philox4x32_10 "philox" true "Philox 4x32 generator with 10 rounds"
shr3cong "v5normal" false "SHR3 shift-register generator summed with CONG linear congruential generator"
swb2712 "v5uniform" false "Modified Subtract-with-Borrow generator, with lags 27 and 12"
threefry4x64_20 "threefry" true "Threefry 4x64 generator with 20 rounds"
xoshiro256pp "xoshiro" true "Xor-shift-rotate generator with 256-bit state and double addition"
Next, specify the generator algorithm to create random number streams. Query the returned table to check if the specified algorithm supports multiple streams. If it does, create three independent random number streams. Otherwise, create one random number stream.
generator = "mrg32k3a"; if T{generator,"MultiStream"} [s1,s2,s3] = RandStream.create(generator,NumStreams=3) else s1 = RandStream.create(generator) end
s1 =
mrg32k3a random stream
StreamIndex: 1
NumStreams: 3
Seed: 0
NormalTransform: Ziggurat
s2 =
mrg32k3a random stream
StreamIndex: 2
NumStreams: 3
Seed: 0
NormalTransform: Ziggurat
s3 =
mrg32k3a random stream
StreamIndex: 3
NumStreams: 3
Seed: 0
NormalTransform: ZigguratOutput Arguments
Table of all available generator algorithms. Each row of the table
describes a generator algorithm, including the generator name, multiple-stream support,
and description, in the table variables Name,
MultiStream, and Description.
For more information about these generator algorithms, see Create and Control Random Number Streams.
Version History
Introduced in R2008bYou can now specify an output argument to return a table of all available generator algorithms. The table provides detailed information for each algorithm, including the generator name, multiple-stream support, and description.
Calling RandStream.list without an output argument now displays a
table of all available generator algorithms with more detailed information about the
generators, including their names and multi-stream support. In previous releases,
RandStream.list displayed only the available generator algorithms and
their descriptions.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)