Data with start and end date only converted to consecutive data for each hour between start and end date
이전 댓글 표시
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
Peter Perkins
2016년 1월 6일
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?).
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!