how to select data in rows based on date in column
1 次查看(过去 30 天)
显示 更早的评论
Analysing climatic data for which Ihave to select certain (period) colums staring from the particular date in excel. Dealing with 3000 rows and 365 columns. Please help me
2 个评论
Kevin Chng
2019-1-17
1) Ensure the relevant column is in datetime dataset
%Ensure the PredictionTable.Time is in datatime datatype.
2) then you could
% get Year 2016 data out for training
tr = timerange('2015-01-01' , '2015-12-31');
PredictionTable_2015 = PredictionTable(PredictionTable.Time(tr),:);
Peter Perkins
2019-1-23
Just to be clear: Kevin is suggesting you use a timetable, and then use timerange to do the subscripting. It's the right suggestion.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!