Help CenterHelp Center
Enable fault simulation for model
Since R2023b
isOn = Simulink.fault.injection(model)
isOn = Simulink.fault.injection(model,status)
isOn = Simulink.fault.injection(model) returns 1 if the model model has fault simulation turned on.
isOn
model
1
example
isOn = Simulink.fault.injection(model,status) turns fault simulation on or off based on the value of status.
status
collapse all
Open the fault_analyzer_intro model.
fault_analyzer_intro
openExample('faultanalyzer/FaultAnalyzerIntroExample')
Check if fault simulation is turned on for the model.
status = Simulink.fault.injection(... "fault_analyzer_intro");
Turn on fault simulation.
status = Simulink.fault.injection(... "fault_analyzer_intro",true);
Path or handle to the model, specified as a string scalar, character vector, or model handle.
Data Types: string | char | double
string
char
double
true
false
0
Fault simulation status, specified as a numeric or logical 1 (true) or 0 (false). Enter 1 or true to turn on fault simulation.
Data Types: logical
logical
Previous fault simulation status of the model, returned as a 1 or 0 of data type logical.
Introduced in R2023b
Simulink.fault.enable | Simulink.fault.isEnabled | Simulink.fault.save
Simulink.fault.enable
Simulink.fault.isEnabled
Simulink.fault.save
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office