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
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 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

尚未输入任何标签。

产品


版本

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by