Select rows of timetable based on Month range
3 views (last 30 days)
Can someone provide the syntax for selecting monthly rowtimes from a timeteble? I would like to select various months. For example, Nov., Dec., Jan., Feb.
Here is what I'm trying:
The 'wintertime' variable and the follwing lines are also screwed up.
% Create new timetables at differing scales.
% Extract the month record
monthofTT = month(TT.Time);
% Determine which records are between November and March (months 1:3 and
wintertime = [1,3;11,12]; % [start, end] of desired months
wintermonths = monthofTT >= winter(1) & wintertime <= winter(2);
% Isolate all row in winter months
TTwinter = TT(month(TT.Time(winterrmonths)), :);