Add variables to table or timetable
T2 = addvars(
adds the variables specified by T1
,var1,...,varN
)var1,…,varN
to the right of the
last variable of T1
. The input arguments
var1,…,varN
can include arrays of any type, tables, and
timetables. All input arguments must have the same number of rows.
T2 = addvars(
inserts the variables to the left of the table variable indicated by
T1
,var1,...,varN
,'Before',location
)location
(see diagram). You can specify
location
as a variable name, or a numeric or logical
index.
T2 = addvars(
inserts the variables to the right of the table variable indicated by
T1
,var1,...,varN
,'After',location
)location
.
Use single quotes for the input names 'Before'
,
'After'
, and 'NewVariableNames'
. To
avoid confusion with variable inputs, do not use double-quoted string scalars
(such as "Before"
) for these names.
mergevars
| movevars
| removevars
| renamevars
| splitvars