Main Content

fitToView

Zoom in on graphical object

Description

example

fitToView(graphicalObject) zooms in on a graphical object in the Stateflow® Editor.

Examples

collapse all

Open a Simulink® model called myModel. Suppose that the model contains a Stateflow chart with a state named A.

open_system('myModel')

Access the Simulink.Root object at the top level of the Stateflow hierarchy.

rt = sfroot;

Find the state named A.

st = find(rt,'-isa','Stateflow.State','Name','A');

Zoom in on the state in the Stateflow Editor.

fitToView(st);

Input Arguments

collapse all

Introduced in R2008a