필터 지우기
필터 지우기

How to delete a variable in a MAT-file, which corresponds to an instance of matlab.io.MatFile

조회 수: 4 (최근 30일)
Background
I use an instance of &nbsp matlab.io.MatFile &nbsp 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 &nbsp matlab.io.MatFile ? &nbsp Is there a better way than copy the variables, which I want to keep, to a new mat-file and delete the old one?

채택된 답변

Walter Roberson
Walter Roberson 2018년 1월 5일

추가 답변 (1개)

Stalin Samuel
Stalin Samuel 2014년 10월 24일
  댓글 수: 1
Jim Hokanson
Jim Hokanson 2018년 1월 5일
For reference, as of Jan 2018 the linked file simply loads all of the variables to keep and saves them into a new file.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by