フィルターのクリア

How to load .mat file except specific variable type?

4 ビュー (過去 30 日間)
Svyatoslav Kharitonov
Svyatoslav Kharitonov 2018 年 4 月 2 日
回答済み: Walter Roberson 2018 年 4 月 2 日
Dear all,
I wonder whether there is a way to automatically load all variable from a .mat file except ones of a specific variable type (e.g. all visa object variables)?
Thank you in advance!

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 4 月 2 日
You would need to use whos() with the '-file' option on the file, and save the output to a variable. Then you would need to go through the list of types to find which variables you do not want to load. Eliminate their names from the list of variables. Now you can generate a load() call that requests all remaining variables.

カテゴリ

Help Center および File ExchangeWorkspace 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