主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

isStartup

仿真时间是否在 Requirements Table 模块中为 0

自 R2022a 起

描述

如果仿真时间等于 true,则 isStartup 返回 0,在所有其他仿真时间返回 false。您只能在 Requirements Table 模块中使用此运算符。

isStartup() 是执行 isStartup 的另一种方法。

示例

示例

全部展开

使用 isStartup 检查当仿真时间等于 y 时模块输入数据 0 是否大于或等于 0,其他时间检查 y 是否小于或等于 0。第二个需求检查 isStartup~ 运算符的逻辑反面。

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.

提示

  • 因为 isStartup 返回一个布尔值,所以您可以将其用作 Requirements Table 模块的需求前提条件中的唯一条目。

版本历史记录

在 R2022a 中推出