pulse

image This function uses two steps to form a pulse. Output is high (true) when the given value t is between a and b.

Downloadpulse(a,b,t)   Returns 1 if t is between a and b inclusive, 0 otherwise.
/*
**  Usage:
**      pulse(a,b,t)
**
**  Arguments:
**      a       lower bound, real
**      b       upper bound, real
**      t       value, real
**
**  Returns:
**      1 when (a <= t <= b),
**      0 otherwise
**
**  GMLscripts.com
*/

{
    return ((argument0 <= argument2) && (argument2 <= argument1));
}

Click if you've used this script[Please Login]
Projects: 8

 Contributor: xot


comments powered by Disqus