| SimEvents® | ![]() |
Set seed values for SimEvents® blocks with random number generators
se_setseeds(seedstruct)
se_setseeds(seedstruct, sysid)
oldseedstruct = se_setseeds(seedstruct...)
[oldseedstruct, status] = se_setseeds(seedstruct...)
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:
system — Value of the sysid input to se_getseeds
seeds — Structure array, each element of which 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
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.
See the Seed Management Workflow for Random Number Generators demo.
se_getseeds, se_randomizeseeds
Setting Seed Values Programmatically
![]() | se_randomizeseeds | simeventsconfig | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |