Main Content

setDataType

Set data type for value type

Since R2021b

    Description

    setDataType(valueType,type) sets the data type for the designated value type.

    example

    Examples

    collapse all

    Create a model archModel.

    modelName = "archModel";
    arch = systemcomposer.createModel(modelName);
    systemcomposer.openModel(modelName);

    Add a value type airSpeed to the dictionary of the model.

    airSpeedType = arch.InterfaceDictionary.addValueType("airSpeed");

    Set the data type for the value type as single.

    airSpeedType.setDataType("single")

    Input Arguments

    collapse all

    Value type, specified as a systemcomposer.ValueType object.

    Data type, specified as a character vector or string for a valid MATLAB® data type.

    Data Types: char | string

    More About

    collapse all

    Version History

    Introduced in R2021b

    See Also

    Functions

    Objects

    Blocks

    Tools