timeevent

Syntax

y = timeevent(x);

Description

y becomes true when time is equal to x. This functions forces the integration algorithm to do a caluculation when time y becomes true. This is a time event function

Examples

The example code below forces the integration algorithm, to do a calculation at the start of the step:

 

x = step(start_time);

y = timeevent(start_time);

Limitations

y must be a boolean, x must be an expression yielding a scalar.