Desktop Tools and Development Environment Previous page   Next Page

Viewing Base and Function Workspaces Using the Stack

When you run M-files, MATLAB assigns each function its own workspace, called the function workspace, which is separate from the MATLAB base workspace. To access the base and function workspaces when running or debugging M-files, use the Stack field in the Workspace browser. The Stack field is only available in debug mode and otherwise is grayed out. The Stack field is also accessible from the Array Editor and the Editor/Debugger. See Debugging M-Files for more information. See also the dbstack and evalin functions.

Creating Graphics from the Workspace Browser

From the Workspace browser, you can generate a graph of a variable. To create a graph, click the graph button on the Workspace browser toolbar and select the graph type. The graph appears in a figure window. The button itself changes to reflect the currently selected style of graph, for example plot or stem.

In addition, you can right-click the variable you want to graph. From the context menu, choose the type of graph you want to create. You can also select multiple variables to graph together.

For more information about creating graphs in MATLAB, see the Using MATLAB Graphics documentation.

Opening Variables and Objects for Viewing and Editing

In the Workspace browser, double-click a variable and it opens in the Array Editor, where you can view and edit the contents of the variable. See Viewing and Editing Workspace Variables with the Array Editor for more information about opening arrays.

Some toolboxes allow you to double-click an object in the Workspace browser to open a viewer or other tool appropriate for that object. For details, see the toolbox documentation for that object type.


Previous page  Changing and Copying Variable Names Viewing and Editing Workspace Variables with the Array Editor Next page

© 1994-2005 The MathWorks, Inc.