Main Content

coder.profile.test.hiliteCriticalPath

Highlight critical path in model canvas

Since R2024a

    Description

    coder.profile.test.hiliteCriticalPath = (criticalPathBlocks) highlights the critical path identified by coder.profile.test.analyzePath in the model canvas. You can also use Code Profile Analyzer app to highlight the path.

    example

    Examples

    collapse all

    Use coder.profile.test.hiliteCriticalPath to highlight the identified critical path in the model canvas programatically.

    Open the CriticalPathIdentify model.

    openExample('CriticalPathIdentify');
    model = "CriticalPathIdentify";

    Identify the critical path by using the coder.profile.test.analyzePath function and store the results in myResults.

    myResults = coder.profile.test.analyzePath(model,SimMode="SIL")

    Get a list of the blocks in the identified path.

    criticalPathBlocks = coder.profile.test.getCriticalPathElements(myResults)
    

    Highlight the identified path in the model canvas.

    coder.profile.test.hiliteCriticalPath(criticalPathBlocks)

    Input Arguments

    collapse all

    Blocks in the critical path, specified as a cell array. Use the coder.profile.test.getCriticalPathElements function to get a cell array of blocks in the critical path identified by a critical path analysis.

    Version History

    Introduced in R2024a