Documentation

timetable2table

Convert timetable to table

Syntax

T = timetable2table(TT)
T = timetable2table(TT,'ConvertRowTimes',false)

Description

example

T = timetable2table(TT)converts theM-by-NtimetableTTto anM-by-(N+1)table. The vector of row times fromTTbecomes the first variable inT.

To write a timetable out to a text or spreadsheet file, first convert it to a table withtimetable2table. Then write the table to a file with thewritetablefunction.

example

T = timetable2table(TT,'ConvertRowTimes',false)converts theM-by-NtimetableTTto anM-by-Ntable.timetable2tablediscards the vector of row times fromTT.

Examples

collapse all

Create a timetable and convert it to a table.

Time = datetime({'2015-12-18';'2015-12-19';'2015-12-20'}); Temp = [37.3;39.1;42.3]; Pressure = [29.4;29.6;30.0]; Precip = [0.1;0.9;0.0]; TT = timetable(Time,Temp,Pressure,Precip); T = timetable2table(TT)
T=3×4 tableTime Temp Pressure Precip ___________ ____ ________ ______ 18-Dec-2015 37.3 29.4 0.1 19-Dec-2015 39.1 29.6 0.9 20-Dec-2015 42.3 30 0

Display the sizes ofTandTT.Thas one more variable thanTTbecausetimetable2tableconverts the row times ofTTto a variable ofT.

whosTTT
Name Size Bytes Class Attributes T 3x4 1668 table TT 3x3 1438 timetable

Create a timetable.

Time = datetime({'2015-12-18';'2015-12-19';'2015-12-20'}); Temp = [37.3;39.1;42.3]; Pressure = [29.4;29.6;30.0]; Precip = [0.1;0.9;0.0]; TT = timetable(Time,Temp,Pressure,Precip)
TT=3×3 timetableTime Temp Pressure Precip ___________ ____ ________ ______ 18-Dec-2015 37.3 29.4 0.1 19-Dec-2015 39.1 29.6 0.9 20-Dec-2015 42.3 30 0

ConvertTTto a table and discard its row times.

T = timetable2table(TT,'ConvertRowTimes',false)
T=3×3 tableTemp Pressure Precip ____ ________ ______ 37.3 29.4 0.1 39.1 29.6 0.9 42.3 30 0

Input Arguments

collapse all

输入timetable.

Extended Capabilities

Introduced in R2016b

Was this topic helpful?