Main Content


Set fault as active fault

Since R2023b


activate(fault) sets the fault, fault, as the active fault and enables the associated model element for fault simulation. If another fault on the same model element is active, the function deactivates the other fault.


collapse all

Open the fault_analyzer_intro model.


Add a fault to the Sine Wave block output port.

myFault = Simulink.fault.addFault(...
"fault_analyzer_intro/Sine Wave/Outport/1");

Assign noise behavior to the fault and store the behavior in a fault model named myBehaviorModel on the path.

FaultBehavior="mwfaultlib/Add Noise");

Set myFault as the active fault and enable fault simulation on the Sine Wave block output port.


Input Arguments

collapse all

Fault, specified as a Fault object.

Version History

Introduced in R2023b