Main Content

getFaultModel

Get name of fault model

Since R2023b

Description

example

name = getFaultModel(fault) returns the name of the fault model that contains the behavior assigned to fault.

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

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

addBehavior(myFault,"myBehaviorModel",...
FaultBehavior="mwfaultlib/Add Noise");

Retrieve the name of the fault model associated with myFault.

myBehaviorModel = getFaultModel(myFault);

Input Arguments

collapse all

Fault, specified as a Fault object.

Output Arguments

collapse all

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

Version History

Introduced in R2023b

See Also

Objects

Functions