I have an event flow that goes like this . . .
1:[-1]
2:[1] previous value [float]
3:[-1]
4:[1] current value [float]
5:[-1]
all I want is compare previous value with current one. It must be somehow doable, but I'm totally stuck on this. any ideas?
compare two values?
-
fractalist
- Member
- Posts: 84
- Contact:
there is something that computes the difference between successive values. diff(X), I think. it should help
th
th
How about using an array of length two and writing to it each time you change from -1 to something else, e.g:
1:[-1]
2:[1] previous value [float] (Copy array[0] to array[1], write value to array[0])
3:[-1]
4:[1] current value [float] (Copy array[0] to array[1], write value to array[0])
5:[-1]
This way your previous value is always there in your array at position one to compare your current value against.
1:[-1]
2:[1] previous value [float] (Copy array[0] to array[1], write value to array[0])
3:[-1]
4:[1] current value [float] (Copy array[0] to array[1], write value to array[0])
5:[-1]
This way your previous value is always there in your array at position one to compare your current value against.
Try out the delta(x) module
Bjørn S
thanks for replay . . . I have already found solution
Queue Data in Array can store values, but only those "if has changed". It has also "force enqueue" that allow enqueued even if value hasn’t changed, but what I want is detect when current values is equal to previous one, so the unchanged values is queued automatically.
Queue Data in Array can store values, but only those "if has changed". It has also "force enqueue" that allow enqueued even if value hasn’t changed, but what I want is detect when current values is equal to previous one, so the unchanged values is queued automatically.
Who is online
Users browsing this forum: No registered users and 21 guests
