Skip to Main Content Skip to Search
Product Documentation

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.

Tips

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

See Also

se_getseeds | se_randomizeseeds

Tutorials

How To

  


Free Discrete Event Simulation Technical Kit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS