How to apply if-else conditions to filter out timetable rows in Matlab?
2 次查看(过去 30 天)
显示 更早的评论
I have very large csv file (having more than 89,000 rows) and it contains the following columns:
stationId, datetime, used, free
My goal is to extract a particular subset from the huge file in some particular time range, and also to extract only those rows in which the sum of used and free values is >= 10 in that time range. I am using the following code for extracting the rows in timetable:
T = readtable('station1.csv');
TT = table2timetable(T);
TR = timerange('2008-05-16 05:00:00', '2008-06-27 06:58');
TT2 = TT(TR, :);
TT2 contains all the rows within the specified time range. Now I have to discard those rows in which the sum of used and free is less than 10. May be the "rowfun" function can do the job, but I don't know how to do that. Any help is highly appreciated. Thanks.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Timetables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!