admin 管理员组

文章数量: 1086019

I recently started working with data dictionaries in Matlab Simulink as it a efficient way to manage the data. I could assign entries for Matlab parameters etc.; however, I am trying to save a structure containing table data (multiple tables) in a data dictionary. The problem is if I simply add an entry using addEntry, I longer can access the internal tables and could see their values or names. Whereas I tried to add Datatype in Architectural section of data dictionary but I can't assign it in design data.

So is there any way that I can assign a 1X1 struct with 7 fields containing tables in the design data section of data dictionary or I should assign the columns of tables to different variables in base workspace to save them as Matlab parameters by using addEntry?

Sample code:

DictionaryFile='myDictionary.sldd';
myDictionaryObj = Simulink.data.dictionary.open(DictionaryFile);
toolDataSectObj=getSection(myDictionaryObj,'Design Data');
addEntry(toolDataSectObj,'TableData',TableStrucutre);

Thank you.

本文标签: simulinkSave a structure in MATLAB data dictionaryStack Overflow