Main Content

deleteBehavior

Delete behavior associated with fault

Since R2023b

Description

example

deleteBehavior(fault) deletes the fault behavior associated with the fault, fault.

Examples

collapse all

Open a model with a block that supports fault modeling.

openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

Add a fault to the DC Motor block.

myFault = Simulink.fault.addFault(...
"SimpleMotorArmatureWindingFault/DC Motor/Armature winding");

Add behavior to the fault.

addBehavior(myFault,"myBehaviorModel");

Delete the behavior.

deleteBehavior(myFault);

Input Arguments

collapse all

Fault, specified as a Fault object.

Tips

  • Deleting faults also deletes the associated fault behavior in the fault model. To delete a fault, use the Simulink.fault.deleteFault function.

  • Deleting fault behaviors automatically saves the fault information file.

  • If you delete a fault behavior and it is the only one in the fault model, you also delete the fault model.

Version History

Introduced in R2023b