how to select data in rows based on date in column

3 views (last 30 days)
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 Comments
Kevin Chng
Kevin Chng on 17 Jan 2019
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
Peter Perkins on 23 Jan 2019
Just to be clear: Kevin is suggesting you use a timetable, and then use timerange to do the subscripting. It's the right suggestion.

Sign in to comment.

Answers (0)

Categories

Find more on Startup and Shutdown 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!