主要内容

本页采用了机器翻译。点击此处可查看英文原文。

ungroup

从函数组中移除所有函数

自 R2026a 起

    说明

    ungroup(functionGroupObj) 会从指定的函数 functionGroupObj 中移除所有组件。

    示例

    示例

    全部折叠

    创建名为 mySoftwareArchitecture 的模型,并获取根架构。

    model = systemcomposer.createModel("mySoftwareArchitecture","SoftwareArchitecture");
    rootArch = model.Architecture;

    创建一个软件组件和三个函数。

    newComp = rootArch.addComponent("Component1");
    newFunctions = newComp.Architecture.addFunction({'Function1','Function2','Function3'});
    rootArch

    确定这三个函数的周期。

    fun1 = newFunctions(1);
    fun1.Period = 0.05;
    fun2 = newFunctions(2);
    fun2.Period = 0.05;
    fun3 = newFunctions(3);
    fun3.Period = 0.2;

    创建一个名为 newFunctionGroup 的函数组。

    functionGroup = rootArch.createFunctionGroup("newFunctionGroup", [fun1, fun2])

    newFunctionGroup 中移除所有组件函数。

    functionGroup.ungroup();

    输入参数

    全部折叠

    函数组,指定为 systemcomposer.arch.Function 对象。

    详细信息

    全部折叠

    版本历史记录

    在 R2026a 中推出