Datetime conversion to table headings
显示 更早的评论
I have two matrices x ~ [3733x1], y ~[3733 x 498] and time ~ 498 x 1 datetime.
I want to be able to write an excel file with x in the first column, and y as subsequent columns. As each dataset(column) in y is at a specific time, I want to put the times as the headers.
I know timetable does this but puts the time stamps in the first row, is there an obvious alternative to timetable that will put the timestamps as headers?
raw_data= [x y];
array2timetable(raw_data, 'RowTimes', time);
T = table(x,y);
T.Properties.VariableNames{2:end} = {Time};
Here is what I've currently tried, but as you can see the 'Rowtimes' is not what I want, so I attempted to create a table and change the variable names but that equally hasn't worked. Am I missing something painfully obvious?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!