remove
类: sltest.testmanager.SpecifiedFault
命名空间: sltest.testmanager
语法
remove(specifiedFault)
说明
remove(
从测试用例的故障集中删除指定的故障。您必须拥有 Simulink® Fault Analyzer™ 才能使用此方法。specifiedFault
)
输入参数
specifiedFault
— 故障集中有故障
sltest.testmanager.SpecifiedFault
对象
故障集中的故障,指定为 sltest.testmanager.SpecifiedFault
对象。
示例
从故障集中添加和删除故障
假设您有一个名为 myTestFile
的测试文件,其中包含测试套件、测试用例和故障集。测试使用模型 myModel
作为被测模型。该模型在 Sine Wave 模块的输出端口上有一个名为 sineFault
的故障。将该故障添加到故障集中。
tf = sltest.testmanager.TestFile("myTestFile.mldatx"); ts = getTestSuite(tf); tc = getTestCase(ts); myFaultSet = getFaultSets(tc); sltest.testmanager.refreshFaults("myModel") myFault = addSpecifiedFault(myFaultSet,... "myModel/Sine Wave/Outport/1","sineFault");
从故障集中删除该故障。
remove(myFault)
版本历史记录
在 R2024a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
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)