Main Content

getAssociatedModel

Retrieve name of model fault

Since R2023b

Description

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

example

Examples

collapse all

Open the fault_analyzer_intro model.

openExample('faultanalyzer/FaultAnalyzerIntroExample')

Add a fault to the Sine Wave block output port.

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

Retrieve the name of the model that contains the fault.

myBehaviorModel = getAssociatedModel(myFault);

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