This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

duration

Control chart execution with the duration operator

Syntax

duration(C)

Description

example

duration(C) returns the number of seconds after the conditional expression, C, becomes true. The duration operator is reset if the conditional expression becomes false. If the duration operator is used within a state, it is reset when the state that contains it is entered. If the duration operator is used on a transition, it is reset when the source state for that transition is entered.

Examples

expand all

The transition occurs when the value of x has been greater than or equal to 0 for longer than 0.1 seconds.

[duration(x >= 0) > 0.1]

Introduced in R2017a