Main Content

Stateflow.DataRange

Range of acceptable values for data

    Description

    Use a Stateflow.DataRange object to specify the range of acceptable values for a data object. For more information, see Limit range.

    Creation

    Each data object and message has its own Stateflow.DataRange object. However, the object only applies for Stateflow.Data objects. To access the Stateflow.DataRange object, use the Props.Range property for the Stateflow.Data object.

    Properties

    expand all

    Stateflow® API objects have properties that correspond to the values you set in the Stateflow Editor. To access or modify a property, use dot notation. To access or modify multiple properties for multiple API objects, use the get and set functions, respectively. For more information, see Modify Properties and Call Functions of Stateflow Objects.

    Minimum value, specified as a string scalar or character vector.

    Maximum value, specified as a string scalar or character vector.

    Examples

    collapse all

    Access the Stateflow.Props and Stateflow.DataRanges objects for the Stateflow.Data object x.

    properties = x.Props;
    range = properties.Range;

    Specify the minimum and maximum acceptable values.

    range.Minimum = "0";
    range.Maximum = "1024";

    Version History

    Introduced before R2006a