Data with start and end date only converted to consecutive data for each hour between start and end date
Show older comments
I have Data in an excel file that shows the start and end date and there is an associated value with each of these events. I need to bring this data into matlab and show the associated values for each hour from the start and end date for each event. The start dates are all in one column in excel and the end dates are all in one column of excel. The event names are all in one column of excel and the values for each event are all in one column of excel.
Start Date:01/01/2015 End date: 01/15/2015 EventName: "x" Value:50
Start Date:01/02/2015 End date: 02/25/2015 EventName: "y" Value:500
What it needs to be in Matlab: This needs to be a table/matrix in matlab where there is every hour for a given period in one column ( have the code for this already) and then each event has a column with the value associated to it filled in to every hour from the start to the end date.
The event names need to be transposed across with unstack and at the same time the values need to be filled in consecutively for all dates between the start and end date. I am very new to matlab and any help would be greatly appreciated. I am thinking this will require a for loop of some type????
1 Comment
Peter Perkins
on 6 Jan 2016
Tim, I think we need a short example of exactly what you are starting with (what does the spreadsheet look like?) and what you want to end up with (what does the table look like?).
Accepted Answer
More Answers (1)
Tim Moriarty
on 6 Jan 2016
0 votes
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!