clearSimulationData
Class: sltest.testmanager.ResultSet
Namespace: sltest.testmanager
Syntax
bytes = clearSimulationData(rs,results)
Description
removes the simulation test results specified by bytes
= clearSimulationData(rs
,results
)results
from the result
set object array, rs
.
Input Arguments
rs
— Results sets
sltest.testmanager.ResultSet
object array
Results sets, specified as a sltest.testmanager.ResultSet
object
array.
results
— Test results to remove
"Baseline"
| "Comparison"
| "InputRun"
| ...
Test results to remove from the results set, specified by one of the following options:
"Baseline"
: Baseline run data. See SaveBaselineRunInTestResult."Comparison"
: Passed baseline or equivalence criteria comparison results. See Compare Model Output to Baseline Data."InputRun"
: External inputs. See Use External File Data in Test Cases."Simulation"
: Simulation output results. See Capture Simulation Data in a Test Case."VerifyResults"
: Passed or untested verify statements. See Verify Model Simulation by Using When Decomposition.
Output Arguments
bytes
— Number of bytes
positive integer
Number of bytes deleted, returned as a positive integer.
Data Types: uint64
Examples
Remove Baseline Criteria Comparison Results
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)