how to select data in rows based on date in column

조회 수: 3 (최근 30일)
deepika suryadevara
deepika suryadevara 2019년 1월 17일
댓글: Peter Perkins 2019년 1월 23일
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
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
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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by