Main Content

isStartup

Whether simulation time is 0

Description

example

isStartup returns true if the simulation time equals 0 and returns false at all other simulation times. You can use this operator only in the Requirements Table block.

isStartup() is an alternative way to execute isStartup.

Examples

expand all

Use isStartup to check when the block input data y is greater than or equal to 0 when the simulation time equals 0, and check that y is less than or equal to 0 at other times. The second requirement checks the logical opposite of isStartup with the ~ operator.

This image shows a Requirements Table that changes the postcondition checked depending on the simulation time. If the simulation time equals 0, the block checks if the input data y is greater than or equal to 0. Otherwise, the block checks if the y is less than or equal to 0.

Tips

  • Because isStartup returns a Boolean value, you can use it as the only entry in a requirement precondition of the Requirements Table block.

  • You can use isStartup with getPrevious to specify time-dependent requirement execution.

Version History

Introduced in R2022a