Loading

MONOTONIC

gts

Produces a new Geo Time Series™ from an input by modifying the value so the result is monotonous. This is technically applying a ratchet effect on values.

The MONOTONIC function expects a boolean on top of the stack and a Geo Time Series™ or list thereof below the boolean. The boolean indicates whether the result should be monotonically increasing (false) or decreasing (true).

MONOTONIC is available since version 1.0.0.

See also

Signatures

Examples

NEWGTS 1 10 <% NaN NaN NaN RAND ADDVALUE %> FOR 'gts' STORE // Generate a GTS with 10 random points $gts 'original' RENAME $gts false MONOTONIC 'increasing' RENAME $gts true MONOTONIC 'decreasing' RENAME