How to save everything except one or two given variable?

13 visualizaciones (últimos 30 días)
Mr M.
Mr M. el 25 de Mayo de 2015
Editada: Peter Jarosi el 26 de Jul. de 2019
It is possible to save all variables except one or two?

Respuesta aceptada

Star Strider
Star Strider el 25 de Mayo de 2015
In a .mat file? Likely yes. If you have many variables in your workspace, the easiest way to include only those you want would be to use the who and then the setdiff function to exclude those you don’t want to save.

Más respuestas (2)

Image Analyst
Image Analyst el 25 de Mayo de 2015

dpb
dpb el 25 de Mayo de 2015
Editada: dpb el 25 de Mayo de 2015
If you can write either
  1. a wild card expression or
  2. a regular expression
that returns everything excepting those you don't want, then yes. There isn't an -except option, however. It's been suggested but never made the adopted features list, never hurts to add your name to the proponents as a feature request at "official" TMW site www.mathworks.com.

Categorías

Más información sobre Parallel Computing 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