Arrays in tabular form whose named columns can have different types
table is a data type suitable for column-oriented or tabular data that is often stored as columns in a text file or in a spreadsheet. Tables consist of rows and column-oriented variables. Each variable in a table can have a different data type and a different size with the one restriction that each variable must have the same number of rows. For more information, see Create and Work with Tables or watch Tables and Categorical Arrays.
Functions
Create Tables and Convert Type
Read and Write Files
Basic Import and Export
Define Import Rules
head |
Get top rows of table, timetable, or tall array |
tail |
Get bottom rows of table, timetable, or tall array |
summary |
Print summary of table, timetable, or categorical array |
height |
Number of table rows |
width |
Number of table variables |
istable |
Determine whether input is table |
stackedplot |
Stacked plot of several variables with common x-axis |
Sort, Rearrange, and Customize
Sort
Rearrange Variables
addvars |
Add variables to table or timetable |
renamevars |
Rename variables in table or timetable |
movevars |
Move variables in table or timetable |
removevars |
Delete variables from table or timetable |
convertvars |
Convert table or timetable variables to specified data type |
splitvars |
Split multicolumn variables in table or timetable |
mergevars |
Combine table or timetable variables into multicolumn variable |
vartype |
Subscript into table or timetable by variable type |
Reshape
rows2vars |
Reorient table or timetable so that rows become variables |
stack |
Stack data from multiple variables into single variable |
unstack |
Unstack data from single variable into multiple variables |
inner2outer |
Invert nested table-in-table hierarchy in tables or timetables |
Customize Properties
addprop |
Add custom properties to table or timetable |
rmprop |
Remove custom properties from table or timetable |
Join and Set Operations
Join Using Key Variables
join |
Combine two tables or timetables by rows using key variables |
innerjoin |
Inner join between two tables or timetables |
outerjoin |
Outer join between two tables or timetables |
Set Operations
union |
Set union of two arrays |
intersect |
Set intersection of two arrays |
ismember |
Array elements that are members of set array |
setdiff |
Set difference of two arrays |
setxor |
Set exclusive OR of two arrays |
Apply Functions to Table Contents
varfun |
Apply function to table or timetable variables |
rowfun |
Apply function to table or timetable rows |
findgroups |
Find groups and return group numbers |
splitapply |
Split data into groups and apply function |
groupsummary |
Group summary computations |