Extract specific table columns of table variable from a .mat file
Afficher commentaires plus anciens
Hello there, Support would be very much apprecaited with the following:
Background: I have append a large number of .mat files that contain tables. These files are very large and I would like to load only specific table columns e.g. a, d, f of the 96 columns, without opening the entire file, to reduce the memory hit. Each .mat file has the same variable 'data_unstacked', of different time periods, that I would later like to append. So,
- I have a filename.mat file that contains a table unstacked_data
- table data_unstacked has a number of colums with 96 variable names a, b, c and so on...
- when I load('filename.mat'), it reveals a 1x1 struct in my workspace that on opening contains the data_unstacked 1123456x96 table
- I would like to only load columns Timestamp, a, d, f etc. of table data_unstacked when I load the file
- Later, once I have loaded, say, twelve of these mat files I would like to append the downselected tables, since they are part of the same timeseries.
Inside the .mat file:

Many thanks!
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 16 Fév 2022
Modifié(e) : Walter Roberson
le 20 Fév 2022
1 vote
A -v7.3 mat file and using matfile() is your only hope.
3 commentaires
Malik
le 20 Fév 2022
Modifié(e) : Walter Roberson
le 20 Fév 2022
Walter Roberson
le 20 Fév 2022
I guess because the table has the header information about variable types and descriptions and so on, that this is just something that is not possible at this time.
Malik
le 22 Fév 2022
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!