Quantcast

Documentation Center

  • Trial Software
  • Product Updates

se_setseeds

Set seed values for blocks with random number generators

Syntax

se_setseeds(seedstruct)
se_setseeds(seedstruct,sysid)
oldseedstruct = se_setseeds(seedstruct)
oldseedstruct = se_setseeds(seedstruct,sysid)
[oldseedstruct, status] = se_setseeds(seedstruct)
[oldseedstruct, status] = se_setseeds(seedstruct,sysid)

Description

se_setseeds(seedstruct) sets the seed parameter values for all SimEvents® blocks specified in seedstruct.

se_setseeds(seedstruct,sysid) applies the seed values to the system sysid, overriding the system specified in the system field of seedstruct.

oldseedstruct = se_setseeds(seedstruct) or oldseedstruct = se_setseeds(seedstruct,sysid)stores the original seed values in oldseedstruct before setting them to the values specified in seedstruct.

[oldseedstruct, status] = se_setseeds(seedstruct) or [oldseedstruct, status] = se_setseeds(seedstruct,sysid) returns status information indicating when the function does not set a seed.

Input Arguments

seedstruct

Structure having the same fields as the output of the se_getseeds function:

  • system — Value of the sysid input to se_getseeds

  • seeds — Structure array, of which each element has these fields:

    • block — Path name of a block that uses a random number generator, relative to system

    • value — Numeric seed value of the block

sysid

System name or subsystem path name.

Output Arguments

oldseedstruct

Structure representing original seed values. The form of oldseedstruct is the same as that of seedstruct.

status

Logical array whose nth entry is false if the nth block in seedstruct meets one of these conditions:

  • Does not exist

  • Is not a SimEvents block

  • Does not have a seed parameter in its current configuration

More About

expand all

Tips

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

See Also

|

Tutorials

Was this topic helpful?