主要内容

remove

Remove function from function group

Since R2026a

    Description

    remove(functionGroupObj,functionObj) removes specified component function functionObj from specified function group functionGroupObj.

    example

    Examples

    collapse all

    Create a model named mySoftwareArchitecture and get the root architecture.

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

    Create a software component and three functions.

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

    Set the period of three functions.

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

    Create a function group named newFunctionGroup.

    functionGroup = rootArch.createFunctionGroup("newFunctionGroup", [fun1, fun2]);
    componentFunction = functionGroup.ComponentFunctions(1);

    Remove function from function group named newFunctionGroup.

    functionGroup.remove(componentFunction);

    Input Arguments

    collapse all

    Function group, specified as a systemcomposer.arch.Function object.

    Function, specified as a systemcomposer.arch.Function object.

    More About

    collapse all

    Version History

    Introduced in R2026a