I could not save dictionary to a mat file using Save Dict D,where Dict is the mat file and D is the dictionary

2 件のコメント

Walter Roberson
Walter Roberson 2015 年 7 月 28 日
What happened when you tried?
Try
save('Dict.mat', 'D');
D Joseph
D Joseph 2015 年 7 月 29 日
when the dictionary is stored as a mat file, first it cannot be stored. Later when it can be stored , it cannot be loaded into another file. When I'm trying to solve it into another .m file , error is shown . what to do to solve this problem.

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

 採用された回答

Sebastian Castro
Sebastian Castro 2015 年 7 月 28 日
編集済み: Sebastian Castro 2015 年 7 月 28 日

0 投票

I am assuming you're using a Simulink Data Dictionary in R2015a (which is when the official API for data dictionaries came out).
What you need to do is extract whichever of the 3 sections (Design Data, Configurations, and/or Other Data) you need. Then, you can use exportToFile as shown below:
>> d = Simulink.data.dictionary.open('dictionaryName.sldd');
>> data = getSection(d,'Design Data')
>> exportToFile(data,'Data.mat')
- Sebastian

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Dynamic System Models についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by