SEED must be a nonnegative integer value less than 2^32

Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

SEED must be a nonnegative integer value less than 2^32

Post by matlab1 »

SEED must be a nonnegative integer value less than 2^32
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Re: SEED must be a nonnegative integer value less than 2^32

Post by matlab1 »

Seed property is used in random number generation.

rng(seed)


https://www.mathworks.com/help/matlab/ref/rng.html

https://www.mathworks.com/help/matlab/ref/randstream.html



seed — Generator initialization

0 (default) | positive integer | 'default' | 'shuffle' | structure

Generator initialization, specified as one of the following options.

Value Description
0 Initializes generator with seed 0.

positive integer Initializes generator with the specified positive integer seed, such as 1.

'default' Initializes Mersenne Twister generator with seed 0. This is the default setting at the start of each MATLAB session.

'shuffle' Initializes generator based on the current time, resulting in a different sequence of random numbers after each call to rng.

structure Initializes generator based on the settings contained in a structure with fields Type, Seed, and State.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests