Test iterations based on Table in Data Dictionary
显示 更早的评论
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.
采纳的回答
更多回答(1 个)
Young Ma
2018-3-21
Hi Bryan,
For the first question, the answer probably would be yes.
For the second question, I would suggest you to take a look at this document to configure parameters properly in data dictionary:
Also, it's possible that the variable is still in Base Workspace and not stored in Simulink Data Dictionary. In that case, you could try the following in scripted iterations:
v = evalin('base', 'var');
This example extracts the value of the variable var in the MATLAB base workspace and captures the value in the local variable v.
类别
在 帮助中心 和 File Exchange 中查找有关 Inputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!