Main Content


Set type for signal interface element



    setType(interfaceElem,type) sets the type for the designated signal interface element.


    collapse all

    Create a model named 'archModel', add an interface, create an interface element with a name 'x', and set the type for the interface element 'single'.

    modelName = 'archModel';
    arch = systemcomposer.createModel(modelName); % Create model
    interface = arch.InterfaceDictionary.addInterface('interface'); % Add interface
    elem = interface.addElement('x'); % Create interface element
    setType(elem,'single'); % Set type for interface element

    Input Arguments

    collapse all

    Interface element, specified as a systemcomposer.interface.SignalElement object.

    Type of interface element, specified as a character vector for a valid MATLAB® data type.

    Data Types: char

    Introduced in R2019a