Workspace Panel - Interactively manage workspace contents - MATLAB (original) (raw)

Interactively manage workspace contents

Description

The Workspace panel enables you to view and interactively manage the contents of the MATLABĀ® workspace. Using this tool, you can:

Workspace panel

Open the Workspace Panel

Examples

expand all

You can interactively rename a variable and change its value using the Workspace panel.

To rename a variable, click its name and enter a new name. For example, change the name of a variable in the Workspace panel.

Edit field for an entry in the Name column in the Workspace panel

To edit the value of a scalar or vector variable, click its value, make changes, and press Enter. For example, change the second element of a vector variable in the Workspace panel.

Edit field for an entry in the Value column in the Workspace panel

To view and edit the values in a variable that shows its size rather than values in the Value column, such as a table, open it in the Variables editor by double-clicking the variable in the Workspace panel.

You can save your workspace variables to a MAT file and clear the workspace. Then, reload the variables from the saved file.

To save all variables in the workspace to a MAT file, right-click the Workspace panel and select Save Workspace in the context menu. Then, specify the filename and location. Alternatively, to save only a subset of variables in the current workspace, select the variables to save. Then, right-click the selection and selectSave Selection in the context menu.

Next, to clear the workspace, right-click the Workspace panel and selectClear Workspace in the context menu.

Then, reload the variables that you saved. On theHome tab, in the File section, click Open and select the MAT file.

You can interactively duplicate or delete variables using the Workspace panel.

To duplicate selected variables, right-click the selection, and then select Duplicate.

To delete selected variables from the workspace, right-click the selection, and then select Delete. To delete all variables from the workspace, right-click the Workspace panel, and then select Clear Workspace. Alternatively, you can use the clear function.

You can display descriptive statistics for each variable as columns in the Workspace panel.

To display descriptive statistics for your variables, right-click the header of any column in the Workspace panel and select the statistics to display. MATLAB computes these statistics using functions such asmin, max, andmean, and updates the results automatically when you update variables in the workspace. For example, display the minimum, maximum, and mean for each variable.

Tip

To improve performance, show only the statistics of interest to you. You can also exclude large arrays from statistical calculations. For more information, see Modify Workspace and Variables Settings.

Name, Value, Size, Class, Min, Max, and Mean are selected in a list of check boxes.

The Workspace panel automatically updates to display the selected statistics.

The Workspace panel displays the name, value, size, class, minimum, maximum, and mean for each variable.

If your data includes missing values, you can specify whether the Workspace panel includes or ignores the missing values when computing statistics. For more information, see Modify Workspace and Variables Settings.

You can interactively create a plot to visualize variables using the Workspace panel.

To visualize your data, select variables in the Workspace panel. Then, on the Plots tab, select a plot from the gallery of plot types. For example, create a scatter plot for variables x and y.

The Workspace panel displays vectors x and y, and a figure displays a scatter plot of x and y.

Programmatic Use

expand all

workspace displays the Workspace panel. If the Workspace panel is already open, MATLAB selects the tool.

Tips

Version History

Introduced before R2006a

expand all

To reflect the updated MATLAB desktop layout, this tool is now named the Workspace panel. Previously, this tool was named the Workspace browser.

Undocking the Workspace panel is no longer supported. You can move the panel by dragging the title bar or sidebar icon to the left, right, or bottom of the desktop.

The Plot Catalog tool has been removed. To interactively create and explore visualizations for your data, use the Plots tab of the MATLAB Toolstrip or the Create Plot task in the Live Editor.

For more information about visualizations, see Types of MATLAB Plots or toolbox-specific documentation.