edge
Trigger event
Parent Section: events
Syntax
edge(b)
Description
edge(b)
takes a scalar boolean expression b
as
input. It returns true, and triggers an event, when and only when the input argument
changes value from false to true. The return data type of edge
is
event
. Event data type is a special category of boolean type,
which returns true only instantaneously, and returns false otherwise.
The following graphic illustrates the difference between boolean and event data types.
edge(b)
returns true only when b
changes from
false to true.
You use the edge
operator to define event predicates in
when
clauses. For more information, see events
.
Version History
Introduced in R2016a