Please enable JavaScript to view this site.

Function to capture both the rising edge of a condition and the falling edge of a condition by setting filters in space or time.

Syntax

bool onoff_filt (bool cond, real varFilt, real thrTrue [, real thrFalse=thrTrue])

cond

Condition to be examined for front search

varFilt

Evolving quantity (typically time(tfb) or space ip(n))

thrTrue

Quantity of varFilt in which to stably see the true condition

thrFalse

Quantity of varFilt in which to stably see the false condition (optional, default thrTrue)

Result

Return:

Value

Condition

FALSE

At startup if cond = FALSE

cond = FALSE and you have exceeded the threshold thrFalse

cond = TRUE but the threshold thrTrue was not exceeded

TRUE

cond = TRUE and you have exceeded the threshold thrTrue

cond = FALSE but the thrFalse threshold was not exceeded

Validity

Rule, Task

Note


Providing ip(n) as a filter variable, for example, will result a filter in space, while providing tfb as a filter variable will result a filter in time (seconds).

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC