Main Content

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

isStartup

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

自 R2022a 起

描述

示例

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

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

示例

全部展开

使用isStartup检查当仿真时间等于0时模块输入数据y是否大于或等于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 中推出