FUNCTION REFERENCE

addvars

Add variables to a table.

Add variables to a table.

Syntax

T2 = addvars(T, var1, ..., varN)

Syntax

T2 = addvars(T, ..., 'Before', loc)   or   'After', loc

Syntax

T2 = addvars(T, ..., 'NewVariableNames', names)

New variables go at the end unless 'Before' or 'After' names one variable (name or index). Default names are the argument's variable name, else VarK by position; a table argument adds each of its variables.

Example

T = table([1;2]); z = [3;4]; T = addvars(T, z, 'Before', 1)   % variables z, Var1

Differences from MATLAB: None known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.