FUNCTION REFERENCE
readtimetable
Read a delimited text file or a spreadsheet into a timetable.
Read a delimited text file or a spreadsheet into a timetable.
Syntax
TT = readtimetable(filename)Syntax
TT = readtimetable(filename, opts)Syntax
TT = readtimetable(..., 'RowTimes', name)Syntax
TT = readtimetable(..., 'RowTimes', times)Reads the file as readtable does (with detection, import options, or readtable's options), then takes the row times from the variable 'RowTimes' names, or without it from the first datetime or duration variable; that variable leaves the variables and its name becomes the first dimension name. 'RowTimes' can also give a datetime or duration vector with one time per row (dimension name 'Time').
Example
writecell({'Day', 'Load'; '2024-01-01', 5; '2024-01-02', 6}, 'load.csv'); TT = readtimetable('load.csv'); TT.Load' % [5 6]Differences from MATLAB: no SampleRate, TimeStep or StartTime options; row times must not be missing.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.