主要内容

coder.profile.test.hiliteCriticalPath

在模型画布中突出显示关键路径

自 R2024a 起

    说明

    coder.profile.test.hiliteCriticalPath = (criticalPathBlocks) 在模型画布中突出显示由 coder.profile.test.analyzePath 标识的关键路径。您也可以使用代码探查分析器来突出显示该路径。

    示例

    示例

    全部折叠

    使用 coder.profile.test.hiliteCriticalPath 以编程方式在模型画布中突出显示标识的关键路径。

    打开 CriticalPathIdentify 模型。

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

    通过使用 coder.profile.test.analyzePath 函数标识关键路径,并将结果存储在 myResults 中。

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

    获取标识的路径中的模块列表。

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

    在模型画布中突出显示标识的路径。

    coder.profile.test.hiliteCriticalPath(criticalPathBlocks)

    输入参数

    全部折叠

    关键路径中的模块,指定为元胞数组。使用 coder.profile.test.getCriticalPathElements 函数获取由关键路径分析标识的关键路径中模块的元胞数组。

    版本历史记录

    在 R2024a 中推出