Documentation

This is machine translation

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

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Tables

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

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
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 two timetables
outerjoin Outer join between two tables or two timetables
sortrows Sort rows of array, table, or timetable
stack Stack data from multiple variables into single variable
unstack Unstack data from single variable into multiple variables
ismissing Find missing values
standardizeMissing Insert standard missing-value indicators
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

Properties

Table Properties Access and modify table metadata properties

Topics

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?