se_setseeds

Set seed values for SimEvents® blocks with random number generators

Syntax

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

Description

se_setseeds(seedstruct) sets the seed parameter values for all SimEvents blocks specified in the structure seedstruct. The input structure has the same form as the output of the se_getseeds function:

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...) stores the original seed values in the structure oldseedstruct before setting them to the values specified in seedstruct. The form of oldseedstruct is the same as that of seedstruct.

[oldseedstruct, status] = se_setseeds(seedstruct...) returns a logical array, status, whose nth entry is false if the nth block in seedstruct was not found, was not a SimEvents block, or did not have a seed parameter in its current configuration.

Examples

See the Seed Management Workflow for Random Number Generators demo.

See Also

se_getseeds, se_randomizeseeds

Setting Seed Values Programmatically

Sharing Seeds Among Models

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS