To only pull certain times from a timetable in MATLAB, you can use logical indexing based on the time values. Here is an example:
main.m403 chars11 lines
In this example, we create a timetable with a time column named TimeValues and a data column named Data. We then specify the times we want to pull from the timetable in the timeToPull array. Using logical indexing (timetableData(timeToPull, :)), we retrieve only the rows with the specified times.
Note that the time values in the timetable should be in datetime format for this method to work properly.
gistlibby LogSnag