主要内容

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

remove

从函数组中移除函数

自 R2026a 起

    说明

    remove(functionGroupObj,functionObj) 将指定的组件函数 functionObj 从指定的函数组 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]);
    componentFunction = functionGroup.ComponentFunctions(1);

    从名为 newFunctionGroup 的函数组中移除该函数。

    functionGroup.remove(componentFunction);

    输入参数

    全部折叠

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

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

    详细信息

    全部折叠

    版本历史记录

    在 R2026a 中推出