
Originally Posted by
mackrackit
The first 10 would be tossed but the second 10 would not because now the pairs are 10,10,11...
Aah...ok, gotcha.
Actually my example 'data series' wasn't a good one, as the data values would actually be in the hundreds (vs units which I used), which allows percentages to be used.
So, assuming a series of data coming into a variable called 'sample'...
Code:
' compare a pair called value & value2 from the incoming 'sample'
value = sample '
upper_window = value2+(value2*4/100) 'create a window 4% above previous sample
lower_window = value2-(value2*4/100) 'create a value 4% below previous sample
if (value>= lower_window) AND (value <= upper_window) then incoming 'sample is within 'allowable error window'?
gosub average 'goto averaging routine
endif
value2 = value1
etc
would something like the above work?#
Edit: Just seen your post/link scalerobotics - off to have reader's digestion! (& yes, I did a search but I guess my keywords weren't erhm key)
Bookmarks