| Stateflow User's Guide | ![]() |
Access the Chart Object
In the previous section, Access the Model Object, you accessed the Model object containing your new chart to return a handle to the Model object for your new model, m. Perform the following steps to access the new Stateflow chart:
find method of the Model object m returns an array of all charts belonging to that model. Because you created only one chart, the result of this command is the chart you created. If you created several charts, the find method returns an array of charts that you could access through indexing (for example, chart(1), chart(2), and so on).
You can also use standard function notation instead of dot notation for the preceding command. In this case, the first argument is the Model object handle, m.
view method of the Chart object whose handle is chart. This displays the specified chart in the Stateflow diagram editor. You should now have an empty Stateflow chart in front of you. Other Stateflow API objects have view methods as well.
| Access the Model Object | Create New Objects in the Chart | ![]() |
© 1994-2005 The MathWorks, Inc.