This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

What Is the MATLAB Workspace?

The MATLAB® workspace consists of the variables you create and store in memory during a MATLAB session. You add variables to the workspace by using functions, running MATLAB code, and loading saved workspaces. For example, if you run these statements:

A = magic(4);
R = randn(3,4,5);
the workspace includes two variables, A and R.

The Workspace browser displays the variables in your workspace. From the Workspace browser, you can select variables to view, modify, or plot.

To open the Workspace browser if it is not currently visible, do either of the following:

  • On the Home tab, in the Environment section, click Layout. Then, under Show, select Workspace.

  • Type workspace at the command prompt.

By default, the Workspace browser displays the base workspace. You also can view function workspaces if MATLAB is in debug mode. For more information, see Debug a MATLAB Program and the dbstack and evalin functions.

You can display additional columns, such as size (dimensions) and size in bytes in the Workspace browser. On the Workspace browser title bar, click , and then click Choose Columns.

More About

Was this topic helpful?