Namespaces for variables, several measurements

7 ビュー (過去 30 日間)
Lennart
Lennart 2013 年 12 月 27 日
コメント済み: Lennart 2014 年 1 月 9 日
It would be nice if Matlab would have a namespace feature. I have several logfiles which have some variables, for instance
voltage1, voltage2, current1, current2.
This measurement has been repeated several times, but this creates a problem if you want to load all the files that variables get overwritten. Thus you have to create custom variables. It would be nice if if was possible to load the variables like this in one load command:
measurement_set1/voltage1
measurement_set1/voltage2
measurement_set1/current1 etc.
and the other
measurement_set2/voltage1
measurement_set1/voltage2
And acces them in this way. Or is there another fast way to do this?

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 27 日
measurement_set1 = load('File1.mat');
measurement_set2 = load('File2.mat');
measurement_set1.voltage1
measurement_set1.voltage2
measurement_set1.current1
measurement_set2.voltage1
measurement_set2.voltage2
  1 件のコメント
Lennart
Lennart 2014 年 1 月 9 日
Ah thanks! Do have to convert first to mat files mut this works handy!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by