I have a matrix where the first column is a time series with dates down to one minute resolution, in the format: yyyy-MM-dd-hh-mm. And in the columns next to it I want to add several types of measured data.
The problem is that some of this data has a lower resolution, for example only measured once a day in the format: yyyy-MM-dd.
What I want to do is insert this data in the high resolution matrix and having the daily values repeated across all hours and minutes of the correct day so that there are no gaps between the values.
Example: I have carbon dioxide data from 2011 measured daily. I want the measured value for 2011-01-01 to be repeated in the bigger matrix all the way from 2011-01-01-00-00 to 2011-01-01-23-59 where then 2011-01-02 starts and so on..
I imagine this shouldn’t be too complicated to do but I’m having trouble figuring out how to do it. Any suggestions?
Thanks.
Best Answer