# Is there any maximum for the size of matlab table?

51 visualizzazioni (ultimi 30 giorni)
Zeynab Mousavikhamene il 14 Nov 2019
Risposto: Walter Roberson il 5 Mag 2021
I need to know if there is maximum for the number of rows and columns of the matlab table.
For example is it ok to have around 2000 rows and 500 columns?
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposte (3)

Walter Roberson il 5 Mag 2021
table() objects are restricted to:
• no more than 2^48 - 1 = 281474976710655 variables
• each variable is restricted to no more than 2^48 - 1 = 281474976710655 in each dimension
• each variable is restricted to 2^48 - 1 = 281474976710655 bytes
• total size of all memory used in a single MATLAB process is restricted to be no more than 2^48 - 1 = 281474976710655 bytes
2000 rows and 5000 columns is no problem at all. Here is one 50 times bigger (100 times bigger ran out of memory on the system I was executing on)
t = array2table(randi(9, 10000, 50000, 'uint8'));
whos t
Name Size Bytes Class Attributes t 10000x50000 511178555 table
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

M il 14 Nov 2019
Modificato: M il 14 Nov 2019
It depends on what you want to store into this table. You can have a look here to find more informations:
##### 1 CommentoMostra NessunoNascondi Nessuno
KAE il 5 Mag 2021

Accedi per commentare.

Steven Lord il 5 Mag 2021
There are theoretical limits (based on limitations of the operating system's ability to address memory) that you are highly unlikely to reach especially now that MATLAB is a 64-bit application.
There are also practical limits (based on how much memory is available on your system) that you likely won't reach.
2000 rows and 500 variables should be well within the practical limit unless you have a lot of other data in your workspace. You can check before filling in the data:
T = table('size', [2000 500], 'VariableTypes', repmat("double", 1, 500));
whos T
Name Size Bytes Class Attributes T 2000x500 8110551 table
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Tables in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by