I have an array of data points, [date, value], like so...

data_points = [[1310279340, 1], [1310279340, 1]]

I need to create an array based on "milliseconds ago", with ten values for each second, or a value for every 100ms going backwards.

The new array's values will look like, [ms ago, value], like so...

ms_ago_points = [[0,3],[100,6],[200,7]]

So the last value in that array represents [200ms ago, value of 7].

I'm having a hard time figuring out how to get "value from Xms ago" based on date values in the first array. If needed I might be able to get the initial date/values in a format other then an array if it would be easier to poll for data.

Thanks for any guidance!!

share|improve this question
what have you tried ? – rab 8 mins ago
while loops, filtering through the array of dates and trying to separate values out on a 100ms gap but it got messy quick and i had no luck getting it to work – boom 6 mins ago
maybe getting the date/values in a structure other then an array could help? – boom 6 mins ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.