timetable2table

Converts a timetable to a table, keeping the row times as a variable.

Category: Language Fundamentals > Data Types

Syntax

T = timetable2table(TT)

Moves the row times into the first variable of the result.

Description

Use it when you need tools that apply to tables only, such as groupsummary on a time column, or to export the times as an ordinary column. The first variable gets the name of the timetable's time dimension, Time by default.

table2timetable converts back.

Input arguments

TT
Timetable.

Output arguments

T
Table with one more variable than TT: the times, followed by the data.

Example

Times become a column

TT = timetable(seconds([0;1]), [5;6], 'VariableNames', {'x'});
timetable2table(TT)
Output
ans = 2×2 table

    Time     x
    _____    _

    0 sec    5
    1 sec    6

See also

table2timetable timetable table array2table