Desktop Tools and Development Environment Previous page   Next Page

Changing and Copying Variable Names

To rename a variable in the workspace, right-click the variable in the Workspace browser and select Rename from the context menu. Type the new variable name over the existing name and press Enter or Return.

To copy variable names to the clipboard, select the workspace variables and select Edit -> Copy. You can then paste the names, for example, into the Command Window. Multiple variables are comma separated.

Deleting Workspace Variables

You can delete a variable, which removes it from the workspace. To delete a variable using the Workspace browser,

  1. In the Workspace browser, select the variable, or Shift+click or Ctrl+click to select multiple variables. To select all variables, choose Select All from the Edit or context menus.
  2. Press the Delete key on your keyboard or click the Delete button on the Workspace browser toolbar.
  3. A confirmation dialog box might appear. If it does, click OK to clear the variables.
  1. The confirmation dialog box appears if you selected that preference. For more information, see Confirmation Dialogs.

To delete all variables, select Edit -> Clear Workspace from any desktop tool.

Function Alternative

Use the clear function to clear variables from the workspace. For example,

clear A M

clears the variables A and M from the workspace.


Previous page  Loading a Saved Workspace and Importing Data Viewing Base and Function Workspaces Using the Stack Next page

© 1994-2005 The MathWorks, Inc.