Stateflow User's Guide Previous page   Next Page

Destroying Stateflow Objects

Each Stateflow object of type State, Box, Function, Note, Transition, Junction, Event, Data, or Target has a destructor method named delete. In the following example, a State object, s, is deleted:

The preceding command is equivalent to performing a mouse select and keyboard delete operation in the Stateflow diagram editor. Upon deletion, graphical Stateflow objects are sent to the clipboard; nongraphical objects, such as data and events, are completely deleted. The workspace variable s still exists but is no longer a handle to the deleted state.


Previous page  Establishing an Object's Parent (Container) Accessing Existing Stateflow Objects Next page

© 1994-2005 The MathWorks, Inc.