Tabelle
table
è un tipo di dati adatto per i dati orientati alle colonne o tabellari, spesso memorizzati come colonne in un file di testo o in un foglio di calcolo. Le tabelle sono costituite da righe e da variabili orientate alle colonne. Ciascuna variabile di una tabella può avere un tipo di dati diverso e una dimensione diversa, con l'unica restrizione che ogni variabile deve avere lo stesso numero di righe. Per maggiori informazioni, vedere Create Tables and Assign Data to Them o guardare Tables and Categorical Arrays (Tabelle e array categorici).
Funzioni
App
Data Cleaner | Preprocess and organize column-oriented data (Da R2022a) |
Attività di Live Editor
Calcolare per gruppo | Summarize, transform, or filter by group in the Live Editor (Da R2021b) |
Tabella Pivot | Summarize tabular data in pivoted table in the Live Editor (Da R2023b) |
Unire le tabelle | Combine two tables using key variables in the Live Editor (Da R2019b) |
Sovrapporre le variabili della tabella | Combine values from multiple table variables into one table variable in the Live Editor (Da R2020a) |
Divergere le variabili della tabella | Distribute values from one table variable to multiple table variables in the Live Editor (Da R2020a) |
Argomenti
- Create Tables and Assign Data to Them
There are several ways to create tables and assign data to them. You can create tables from input arrays, preallocate tables and fill them in later, or import tables from text files or spreadsheets.
- Control How MATLAB Imports Your Data
If you want to control the import process beyond the options provided by the
readtable
function, such as defining how to handle missing data or errors, then create an import options object before importing the data. - Access Data in Tables
Indexing into tables with parentheses, dot notation, and curly braces accesses table data in different ways. 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.
- Direct Calculations on Tables and Timetables
You can perform calculations directly on tables and timetables without indexing to extract their data. All the variables in your tables and timetables must have data types that support calculations.
- Plots That Support Tables
Create plots by passing tables directly to plotting functions.
- Tables of Mixed Data
Use tables to store mixed-type data conveniently, access data with numeric or named indexing, and to store metadata.
- Changes to DimensionNames Property in R2016b
Tables can raise compatibility warnings, and change dimension names, when you modify the DimensionNames property.