Main Content

clearSimulationData

Class: sltest.testmanager.ResultSet
Namespace: sltest.testmanager

Delete specified simulation test results in result set objects

Since R2022a

Syntax

bytes = clearSimulationData(rs,results)

Description

bytes = clearSimulationData(rs,results) removes the simulation test results specified by results from the result set object array, rs.

Input Arguments

expand all

Results sets, specified as a sltest.testmanager.ResultSet object array.

Test results to remove from the results set, specified by one of the following options:

Output Arguments

expand all

Number of bytes deleted, returned as a positive integer.

Data Types: uint64

Examples

expand all

Open the model for this example.

openExample('sldemo_absbrake');

Create the test file, test suite, and test case structure.

tf = sltest.testmanager.TestFile("API Test File");
ts = createTestSuite(tf,"API Test Suite");
tc = createTestCase(ts,"baseline","Baseline API Test Case");

Remove the default test suite.

tsDel = getTestSuiteByName(tf,"New Test Suite 1");
remove(tsDel);

Assign the system under test to the test case.

setProperty(tc,"Model","sldemo_absbrake");

Capture the baseline criteria and set the tolerance.

baseline = captureBaselineCriteria(tc,"baseline_API.mat",true);
baseline.AbsTol = 15;

Change the model. Set the value of the Constant block, Desired relative slip, to 0.22.

set_param("sldemo_absbrake/Desired relative slip",Value="0.22");

Run the test case and return a sltest.testmanager.ResultSet object with results data.

resultsObj = run(tc);

Delete the passed baseline criteria comparison results.

clearSimulationData(resultsObj,"Comparison");

Version History

Introduced in R2022a