T2 = movevars(T1,vars,'Before',location)
moves the table variables specified by vars to the left of the
variable specified by location. You can specify variables and
location by name, by position, or using logical
indices.
T2 = movevars(T1,vars,'After',location)
moves the variables to the right of the table variable indicated by
location (see diagram).
vars — Variables in input table character vector | cell array of character vectors | string array | numeric array | logical array
Variables in the input table, specified as a character vector, cell array
of character vectors, string array, numeric array, or logical array.
location — Location to insert moved variables character vector | string scalar | integer | logical array
Location to insert moved variables, specified as a character vector,
string scalar, integer, or logical array.
If location is a character vector or string
scalar, then it is the name of a variable in the input table
T1.
If location is the integer
n, then it specifies the nth
variable in T1.
If location is a logical array, whose
nth element is 1
(true), then it specifies the
nth variable in T1. All
other elements of location must be
0 (false).
Extended Capabilities
Tall Arrays Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For
more information, see Tall Arrays.
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
The input argument vars cannot contain duplicate
variable names.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.