Add a signal interface element


element = addElement(interface,name) adds an element to a signal interface with default properties.

element = addElement(interface,name,Name,Value) sets the properties of the element as specified in Name,Value.


collapse all

Add an interface newinterface to the interface dictionary of the model and add an element with type double to it.

interface = addInterface(archModel.InterfaceDictionary,'newsignal');
element = addElement(interface,'newelement','Type','double')

Input Arguments

collapse all

This is the interface that the new element is to be added.

Data Types: systemcomposer.interface.SignalInterface

The new element name must be a valid variable name.

Data Types: char

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Type', 'double'

Data type of the element. Must be a valid data type.

Data Types: char

Each element is the size of the element in the corresponding direction. A scalar integer indicates a scalar or vector element, a row vector with two integers indicates a matrix element.

Data Types: char

This describes whether the element is purely real, or if an imaginary part is allowed.

Data Types: string

Output Arguments

collapse all

Introduced in R2019a