How to apply if-else conditions to filter out timetable rows in Matlab?
조회 수: 3 (최근 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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!