Main Content

isStartup

Whether simulation time is 0 in Requirements Table block

Since R2022a

Description

isStartup returns true if the simulation time equals 0 and returns false at all other simulation times. Use this operator only in the preconditions of a Requirements Table block.

isStartup() is an alternative way to execute isStartup.

example

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.

Version History

Introduced in R2022a