Main Content

Simulink.fault.libraries

Get and register libraries containing fault behaviors

Since R2023b

Description

example

faultLibraries = Simulink.fault.libraries returns the registered libraries that specify the fault behaviors you can select when you create new faults or add fault behaviors to faults. For more information on adding new libraries, see Create Predefined and Custom Fault Behaviors.

example

faultLibraries = Simulink.fault.libraries(newLibrary) adds the custom library file, newLibrary, to the registered list of fault libraries. The library file must contain only Fault Subsystem blocks.

Examples

collapse all

Retrieve the fault behavior libraries.

libs = Simulink.fault.libraries;

Suppose you have a library file named myLibrary in the current directory that contains custom fault behaviors modeled in Fault Subsystem blocks. Add the library to registered list of libraries.

libs = Simulink.fault.libraries("myLibrary");

Input Arguments

collapse all

Library to add to the list of registered libraries, specified as a string scalar or character vector.

Data Types: char | string

Output Arguments

collapse all

Registered libraries that define fault behaviors, returned as a cell array of character vectors.

Version History

Introduced in R2023b