Main Content

getAssociatedModel

Retrieve name of model fault

Since R2023b

Description

example

name = getAssociatedModel(fc) returns the name of the model that contains the fault or conditional, fc.

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");

Retrieve the name of the model that contains the fault.

myBehaviorModel = getAssociatedModel(myFault)
myBehaviorModel =

    'SimpleMotorArmatureWindingFault'

Input Arguments

collapse all

Fault or conditional, specified as a Fault or Conditional object.

Output Arguments

collapse all

Name of the model that contains the fault or conditional, returned as a character vector.

Version History

Introduced in R2023b

See Also

Objects

Functions