Using a values time.


Recommended Posts

How would I go about using a time value to find a value in a different variable?

Not the time the data occured, but the value at that time.

Say I have a clock counting minutes and it hits 25 minutes counted.

I want to use that 25 to count back in a seperate values history to display the value

that it was, "25 minutes ago".

Is this easily done?

Any pointers would be great! :D

Link to comment
Share on other sites

If the desired point has the EXACT same time, you can use the search function: search(mychannel.time == timevalue) which will return the index of the desired data point. If its not the exact same time, you can use subsetting by time:

mychannel[timevalue - 0.1, timevalue + 0.1]

where 0.1 is some range that is large enough to cover the difference, but small enough not to catch two data points.

Link to comment
Share on other sites

  • 2 months later...

This is great!

mychannel[timevalue - 0.1, timevalue + 0.1] works perfectly...

You really have helped me out this whole way through.

Almost coming up on 3 years of DF use! How the time passes!

Thanks a million AzeoTech!


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.