MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
The result of TT2.Variables is the same as the result of using curly braces to extract
data, using the TT2{:,:} syntax.

You can concatenate the variables in TT2 into an array of doubles. However, TT contains
numeric, categorical, and datetime variables that cannot be concatenated. The
Variables property returns an error when variables cannot be concatenated. To avoid
such an error, you can subscript by variable type before using the Variables property.

Subscript into TT to select numeric variables and extract them into a matrix.

A = TT(:,vartype('numeric')).Variables;
A(1:5,:)

ans = 5×2
106 ×

0.0005 1.8202
0.0005 0.2120
0.0003 0.1429
0.0004 0.3404
0.0002 0.2128

See Also
retime | synchronize | table2timetable | timerange | timetable | vartype |
withtol

Related Examples



  • “Create Timetables” on page 10-2

  • “Resample and Aggregate Data in Timetable” on page 10-7

  • “Combine Timetables and Synchronize Their Data” on page 10-11

  • “Clean Timetable with Missing, Duplicate, or Nonuniform Times” on page 10-31


10 Timetables

Free download pdf