Matching different time series
显示 更早的评论
Hi, I have several data (files) that each of them contains one column for time and some columns for values of some variables. I want to match these data according to time in one file but the start time, finish time and sample time (time interval) are given by user. Actually I want to have the values (if it is possible the real value or the closest approximation) of all variables at times that the user wants. For example, suppose that I have two data sets (A and B) as the following and the user wants to have the values of these variables based on the following start time, finish time and sample time (time interval): A=[‘29/07/2014 08:00:06.415’ 21 ‘29/07/2014 08:10:06.415’ 23 ‘29/07/2014 08:18:06.415’ 27] ; B=[‘29/07/2014 08:05:06.415’ 2.1 ‘29/07/2014 08:08:06.415’ 3.1 ‘29/07/2014 08:19:06.415’ 4.5]; Start time: ‘29/07/2014 08:00:00.000’; Finish time: ‘29/07/2014 08:20:00.000’; Sample time: 5 ;% based on minute
Finally I want to have a set of data as the following: F=[‘29/07/2014 08:00:00.000’ A1 B1 ‘29/07/2014 08:05:00.000’ A2 B2 ‘29/07/2014 08:10:00.000’ A3 B3 ‘29/07/2014 08:15:00.000’ A4 B4 ‘29/07/2014 08:20:00.000’ A5 B5]; That A1:A5 and B1:B5 are the closest approximation to the real ones that are mentioned in A and B (if there are different methods for approximation, please tell me). Please help me how can I do this work?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!