我是靠谱客的博主 哭泣香菇,这篇文章主要介绍Stateflow_duration计时1 语法2 案例1备注:参考文献:,现在分享给大家,希望可以做个参考。

在Stateflow中可以使用duration函数进行计时事件持续的时间。具体使用方法可以参考Stateflow的帮助文档:《Stateflow User Guide》。

1 语法

duration(C)

C is an expression that evaluates to true or false.

Returns the number of seconds since the conditional expression C became true and the associated state became active.

The value of the duration operator is reset if the conditional expression becomes false or if the associated state becomes inactive.

2 案例1

c的输出结果:

 

备注:

  1. duration在2016版的Matlab中不支持,但是2018版的Matlab中可以运行。如果在16版中运行会出现报错“The 'duration' class does not support code generation.”

参考文献:

《Stateflow User Guide》rightarrowUse Actions in ChartsrightarrowControl Chart Execution by Using Temporal Logic

最后

以上就是哭泣香菇最近收集整理的关于Stateflow_duration计时1 语法2 案例1备注:参考文献:的全部内容,更多相关Stateflow_duration计时1内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(150)

评论列表共有 0 条评论

立即
投稿
返回
顶部