This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


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.


table Create table from workspace variables
array2table Convert homogeneous array to table
cell2table Convert cell array to table
struct2table Convert structure array to table
table2array Convert table to homogeneous array
table2cell Convert table to cell array
table2struct Convert table to structure array

Basic Import and Export

readtable Create table from file
writetable Write table to file

Defining Import Rules

detectImportOptions Create import options based on file content
getvaropts Get variable import options
setvaropts Set variable import options
setvartype Set variable data types
istable Determine whether input is table
head Get top rows of table, timetable, or tall array
tail Get bottom rows of table, timetable, or tall array
height Number of table rows
width Number of table variables
summary Print summary of table, timetable, or categorical array
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
unique Unique values in array
union Set union of two arrays
join Combine strings, or merge 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
sortrows Sort rows of matrix or table
stack Stack data from multiple variables into single variable
unstack Unstack data from single variable into multiple variables
vartype Subscript into table or timetable by variable type
ismissing Find missing values
standardizeMissing Insert standard missing values
rmmissing Remove missing entries
fillmissing Fill missing values
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


Table Properties Access and modify table metadata properties


Advantages of Using Tables

Use tables to store mixed-type data conveniently, access data with numeric or named indexing, and to store metadata.

Create and Work with Tables

This example shows how to create a table from workspace variables, work with table data, and write tables to files for later use.

Access Data in a Table

Indexing into tables with parentheses, curly braces, and dot notation has different results. You can use indexing to create a table that is a subset of a larger table or to create an array from data in a table.

Calculations on Tables

This example shows how to perform calculation on tables.

Was this topic helpful?