How do I access the current iteration number in SystemTest 2.2 (R2008b)?
1 次查看(过去 30 天)
显示 更早的评论
I am running tests on my Simulink model using SystemTest 2.2 (R2008b). I would like to do some actions based on the current iteration number. How can I access the current iteration number in a MATLAB element in the SystemTest?
采纳的回答
MathWorks Support Team
2010-3-29
You can access the current 'Resultset' in a SystemTest by using the following commands:
obj = systest.testresults.getCurrent;
currentResults = obj.ResultsDataSet;
Similarly, you can access the current iteration number using the property called 'NumberOfIterations'. The following code in a MATLAB element inside a main loop will display the current iteration number:
obj = systest.testresults.getCurrent;
disp(obj.NumberOfIterations);
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!