I need to made a formula for a software, and I can use only these functions/operarions.
The input values range for this process is from 0 to 9. The input values are inserted random.
I want that if the input value is <5, the output of the formula is the value just inserted. Else, it must outputs the last output value.
For example, if the sequence is:
1 6 3 2 7 4 9...
the output must be
1 1 3 2 2 4 4...
Unfortunatly, I need to write this formula in one line expression. There isn't any memory/assignation available.
Is it possible do this with a simple math process? "Keeping" in some way a value with the available functions listed above?