Main Content

simscape.findFaultableBlocks

Find blocks that support fault modeling

Since R2023b

    Description

    blockPaths = simscape.findFaultableBlocks(modelName) returns the block paths that support fault modeling for the model modelName. This function finds every fault-capable block in the system hierarchy. If there are no fault-capable blocks, the function returns an empty array.

    example

    Examples

    collapse all

    This example shows how to identify which blocks in a model are fault-capable.

    Open a model with a block that supports fault modeling.

    openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

    faultableBlocks = simscape.findFaultableBlocks('SimpleMotorArmatureWindingFault')
    faultableBlocks = 
    
        "SimpleMotorArmatureWindingFault/DC Motor"

    Input Arguments

    collapse all

    Model name, specified as a character vector or string scalar. If the model is not on the MATLAB® path, modelName must include the full path.

    Data Types: char | string

    Output Arguments

    collapse all

    Array of block paths, returned as a string array. The array contains the path to every fault-capable block n the system hierarchy.

    Version History

    Introduced in R2023b