www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SelectTimetableRowsInClosedTimeIntervalExample.m
%% Select Timetable Rows in Closed Time Interval % Create a timetable. Time = [seconds(1):seconds(1):seconds(5)]; TT = timetable(Time',[98;97.5;97.9;98.1;97.9],[120;111;119;117;116],... 'VariableNames',{'Reading1','Reading2'}) %% % Select rows that fall within a closed time interval between two and four % seconds. The closed interval includes both the start and end times. S = timerange(seconds(2),seconds(4),'closed'); TT2 = TT(S,:)