I'm interested on generating iterations for Simulink Test. The system under test operates based on a truth table, stored in a Data Dictionary. I want to generate iterations from the latest version stored in the data dictionary at the time of testing. If my data is as follows, I would want to generate and test 9 iterations: table = 1 0 0 1 1 0 1 1 1 2 questions: Are scripted iterations (2 nested for loops) the best way to generate the test cases? If so, how do you use variables from the data dictionary? Currently I get "Undefined function or variable 'table'" if I try to store the data to pass to my nested loop.
John Williams answered .
2025-11-20
% Open the dictionary object
DictObj = Simulink.data.dictionary.open('dictionary.sldd'); %open the dictionary object%
% Retrieve the section of the dictionary containing the data
SectObj = getSection(DictObj,'Design Data');
% Retrieve the data I care about
Entry = getEntry(SectObj,'transitions');
% Store the Entire entry
temp = getValue(Entry);
% Store the Value of the entry for generation of test iterations
Table = t.Value;