Extract a table with some range of dates

Suppose I have a table with date from 2000 to 2018. I want to create a new table where the date is between Jan 1 2010 and Dec 31 2017. Please advise.

3 Comments

Are the entries formatted as serial datenum, or as datetime, or as character vectors, or ... ?
How do I know?
what is class() of one of the entries, and what is a typical value?

Sign in to comment.

 Accepted Answer

In R2016b or later, the best way to do this is to use a timetable, and use timerange to create a row subscript.

2 Comments

What is a difference between timetable and table?
"timetable is a type of table that associates a time with each row."
https://www.mathworks.com/help/matlab/timetables.html

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!