How to delete a variable in a MAT-file, which corresponds to an instance of matlab.io.MatFile
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
per isakson
il 24 Ott 2014
Commentato: Jim Hokanson
il 5 Gen 2018
Background
I use an instance of   matlab.io.MatFile   to store and manipulate huge variables. (Huge compared to the capacity of my PC.) During the development of my code I create too many useless variables in the mat-file. The size of the mat-file and the number of variables increases.
The mat-file is version v7.3, which is an HDF5-file. With HDF5 there is no easy way to delete a dataset and recover the space. It is possible to "unlink" a variable and copy the HDF5-file to a new one.
Question
How to delete a variable in a MAT-file, which corresponds to an instance of   matlab.io.MatFile ?   Is there a better way than copy the variables, which I want to keep, to a new mat-file and delete the old one?
0 Commenti
Risposta accettata
Più risposte (1)
Stalin Samuel
il 24 Ott 2014
1 Commento
Jim Hokanson
il 5 Gen 2018
For reference, as of Jan 2018 the linked file simply loads all of the variables to keep and saves them into a new file.
Vedere anche
Categorie
Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!