Quantcast

Documentation Center

  • Trial Software
  • Product Updates

se_randomizeseeds

Randomize seeds

Syntax

se_randomizeseeds(obj,Name,Value)
se_randomizeseeds(obj,'Mode','All',Name,Value)
se_randomizeseeds(obj,'Mode','Identical',Name,Value)
se_randomizeseeds(obj,'Mode','SpecifySeeds',sv,Name,Value)

Description

se_randomizeseeds(obj,Name,Value) or se_randomizeseeds(obj,'Mode','All',Name,Value) assigns the seeds of all SimEvents® blocks that use random number generators within blocks indicated by obj. If obj represents a system or subsystem, the function assigns seeds in subsystems of obj at any depth. Zero or more Name,Value pair arguments specify additional options. Unless the syntax includes the GlobalSeed option, the new seeds are unique in the system obj.

se_randomizeseeds(obj,'Mode','Identical',Name,Value) assigns only those seeds in the system or subsystem obj that appear multiple times in obj.

se_randomizeseeds(obj,'Mode','SpecifySeeds',sv,Name,Value) assigns only those seeds whose current value appears in the vector sv.

Input Arguments

obj

Location of seeds to assign. obj is either a string representing a system name, subsystem path name, or block path name, or a cell array of such strings.

sv

Vector of seed values. Each number is an integer between 0 and 231–1.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'GlobalSeed'

For a given value, the function generates seeds in a repeatable way, assuming that the underlying systems or blocks specified in obj do not change. To ensure repeatability, this syntax does not guarantee uniqueness of generated seed values. The value of this option is a nonnegative integer.

'Verbose'

Indicates whether the function explicitly reports the status of each seed assignment. Values are 'on' and 'off'.

Default: 'off'

More About

expand all

Tips

  • Before invoking this function, load or open the system where you want to assign seeds.

See Also

|

Tutorials

Was this topic helpful?