Generating an excel file from a timetable
25 次查看(过去 30 天)
显示 更早的评论
I am trying to generate an excel file from a timetable. The timetable is an array of 2 columns, 1 contains the date and the other column data. I used this code: filename2 = 'daily'; xlswrite(filename2,temp_Hourly,'A1')
I am getting this error: Input data must be a numeric, cell, or logical array. can someone help please?
回答(1 个)
KSSV
2018-10-16
编辑:KSSV
2018-10-16
Read about writetable
% generate some dates
t1 = datetime(2018,10,1,0,0,0);
t2 = datetime(2018,10,20,0,0,0);
time = (t1:t2)' ;
% some random temperatures
Temperature = rand(size(time)) ;
% write table to excel
T = table(time,Temperature) ;
writetable(T,'test.xlsx')
1 个评论
Guillaume
2018-10-16
In fact, forget xlsread and xlswrite. They've both been superseded by readtable and writetable respectively, which are a lot more powerful.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!