BeeHay Posted January 6, 2010 Share Posted January 6, 2010 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! Link to comment Share on other sites More sharing options...
AzeoTech Posted January 8, 2010 Share Posted January 8, 2010 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 More sharing options...
BeeHay Posted March 11, 2010 Author Share Posted March 11, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.