Main Content

Stateflow.Editor

Graphical aspects of a chart or state transition table

    Description

    Use the Stateflow.Editor object to access the graphical aspects of a Stateflow® chart or state transition table. You can use the Stateflow.Editor object to control the position, size, and magnification level of the Stateflow Editor window.

    Creation

    Each chart has its own Stateflow.Editor object. When you create a chart, an Stateflow.Editor object is automatically created for it. To access the Stateflow.Editor object, use the Editor property for the chart. For example, if ch is a Stateflow.Chart or Stateflow.StateTransitionTableChart object, enter:

    editor = ch.Editor;

    Properties

    expand all

    Position and size of the Stateflow editor window, specified as a four-element numeric vector of the form [left top width height].

    Magnification level of the chart or state transition table in the editor, specified as a scalar value between 0.5 and 10. A value of 1 corresponds to a magnification of 100%.

    Object Functions

    classhandleProvide class handle for object
    getReturn MATLAB structure containing property settings of object or array of objects
    setSet properties with specified values
    zoomInZoom in on Stateflow chart
    zoomOutZoom out on Stateflow chart

    Examples

    collapse all

    Increase the magnification level of a nonempty chart ch.

    editor = ch.Editor;
    zoomIn(editor)

    If the magnification level for the chart was initially 100%, this command increases it to 130%.

    Decrease the magnification level of a nonempty chart ch.

    editor = ch.Editor;
    zoomOut(editor)

    If the magnification level for the chart was initially 100%, this command decreases it to 76.9%.

    Set the ZoomFactor property for a nonempty chart ch to an absolute magnification level of 150%.

    editor = ch.Editor;
    editor.ZoomFactor = 1.5;
    Introduced before R2006a