Borrar filtros
Borrar filtros

how can i deleted unused data

3 visualizaciones (últimos 30 días)
Zhenwei Sun
Zhenwei Sun el 24 de Ag. de 2018
Comentada: Zhenwei Sun el 3 de Sept. de 2018
I’m copy a part sub-module from another project, and implement in my new project. I also copy all the data/signal define to base workspace to avoid any mistakes. But after success built my new project, how can I remove all the data/signals which not used in my project. Or only save the data/signals which used in my project.

Respuestas (1)

Adam Danz
Adam Danz el 24 de Ag. de 2018
Don't delete the data. Data storage is cheap these days so just keep it. If you're talking about removing the data from your mat files, that's another story.
Option 1 is to only import the data you need in the first place. It's much more efficient to import only the needed data rather than importing all of the data and then removing what's not needed.
Option 2, if you've already got your mat files and you have the need to clean them up or reduce file size, assuming the data you want to remove is stored somewhere else for future reference, here's how to remove selected variables:
Assuming your mat file is loaded into the workspace, remove variables "var1" and "var2" like this:
clear('var1', 'var2');
Then save your mat file, overwriting the existing file.
If you're trying to remove variables from a mat file that isn't loaded into the workspace, see this (I've never used). https://www.mathworks.com/matlabcentral/answers/254048-how-can-i-delete-variables-in-my-mat-file-without-loading-them-into-matlab-7-2-r2006a#comment_472754
  1 comentario
Zhenwei Sun
Zhenwei Sun el 3 de Sept. de 2018
thx for your inf. yes, currently I used pre-save and pre-load command to save/load the base workspace data to a .mat file. I will try on your examples.

Iniciar sesión para comentar.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by