How to save everything except one or two given variable?

15 ビュー (過去 30 日間)
Mr M.
Mr M. 2015 年 5 月 25 日
編集済み: Peter Jarosi 2019 年 7 月 26 日
It is possible to save all variables except one or two?

採用された回答

Star Strider
Star Strider 2015 年 5 月 25 日
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.
  1 件のコメント
Peter Jarosi
Peter Jarosi 2019 年 7 月 26 日
編集済み: Peter Jarosi 2019 年 7 月 26 日
Wooow... fascinating!

サインインしてコメントする。

その他の回答 (2 件)

Image Analyst
Image Analyst 2015 年 5 月 25 日

dpb
dpb 2015 年 5 月 25 日
編集済み: dpb 2015 年 5 月 25 日
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.

カテゴリ

Help Center および File ExchangeParallel Computing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by