Development Environment    

Loading a Saved Workspace and Importing Data

To load saved variables into the workspace:

  1. Click the load data button on the toolbar in the Workspace browser, or right-click in the Workspace browser and select Import Data from the context menu.
  1. The Open dialog box opens.

  1. Select the MAT-file you want to load and click Open.
  1. The variables and their values, as stored in the MAT-file, are loaded into the current workspace. If any variables being loaded have the same names as variables in the current workspace, the values from the MAT-file replace the values in the current workspace. Any variables in the MAT-file that are not in the workspace are added to the workspace.

Function Alternative

Use load to open a saved workspace. For example,

loads all workspace variables from the file june10.mat.

Importing Data

MATLAB provides other methods and functions for loading information. You can use one of these methods, the Import Wizard, from the Workspace browser--select Edit -> Paste Special or use Ctrl+V to import data to MATLAB using the Import Wizard. For more information on the Import Wizard and other methods for loading information, see Importing and Exporting Data.

  Saving the Current Workspace Changing and Copying Variable Names