How can I delete a specific row from a timetable?
17 ビュー (過去 30 日間)
古いコメントを表示
Hi!
Thank you for all the supports you guys always provide here. I have a question. I attached a timetable. It's a very simple timetable.mat file with only 15 rows.
What I want is to delete those rows that has the beginning hours, for example, 01:00, 04:00, 06:00, 08:00 etc. And I want to keep the only time rows that are in between, such as, 03:15, 08:12, 11:39.

Can anyone please help me with this issue? The .mat file is attached with the question.
0 件のコメント
採用された回答
Star Strider
2023 年 1 月 30 日
Try something like this —
LD = load(websave('TimeTable','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1278715/TimeTable.mat'));
Period = LD.Period
Period.TimeSeries = Period.TimeSeries + timeofday(datetime(Period.HourSeries, 'InputFormat','HH:mm'))
RowsToKeep = minute(Period.TimeSeries) ~= 0
PeriodEdited = Period(RowsToKeep,:)
.
2 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!