Desktop Tools and Development Environment Previous page   Next Page

Starting MATLAB

Instructions for starting MATLAB depend on your platform. For a list of supported platforms, see the system requirements in the Products section of the MathWorks Web site, http://www.mathworks.com. Topics related to starting MATLAB are

Starting MATLAB on Windows Platforms

To start MATLAB on a Microsoft Windows platform, select the Start -> Programs -> MATLAB 7.0.1 -> MATLAB 7.0.1, or double-click the MATLAB shortcut icon on your Windows desktop. The shortcut was automatically created when you installed MATLAB. If you have trouble starting MATLAB, see troubleshooting information in the Installation Guide for Windows.

To start MATLAB from a DOS window, type matlab at the DOS prompt.

After starting MATLAB, the MATLAB desktop opens. All of the desktop components that were open when you last shut down MATLAB will be opened on startup.

You can also start MATLAB on Windows platforms by double-clicking a MATLAB file, such as .mat, .mdl, and .fig files, in Windows Explorer. Be sure to open any subsequent MATLAB files from within MATLAB so as not to start a new instance. (Each time you double-click a MATLAB file in Windows Explorer, it starts a new instance of MATLAB.) Double-clicking an M-file (.m), by default, starts the MATLB stand-alone Editor instead of MATLAB--for more information, see Opening the Editor Without Starting MATLAB. You can start MATLAB by double-clicking an M-file or any other file type by changing the file association for the file type, either when you install MATLAB or as described in the following section.

Starting MATLAB from an M-File or Other File Type

By default, double-clicking an M-file opens the MATLAB stand-alone Editor. If instead you want MATLAB to open when you double-click an M-file or some other file type, use Windows Explorer to change the file association for the file type, as described in the following example.

The instructions in this example might not apply to your version of Windows. If you encounter differences or problems, see your Windows documentation for exact instructions about configuring file associations for your version.

To change the file association for M-files,

  1. In Windows Explorer, select Tools -> Folder Options.
  2. In the resulting Folder Options dialog box, select the File Types tab.
  3. Under Registered file types, select the extension M for MATLAB M-file.
  4. Under Details for 'M' extension, click Advanced.
  5. In the resulting Edit File Type dialog box, click Edit.
  6. In the resulting Editing action for type: 'MATLAB M-file' dialog box, supply the path to your MATLAB executable, matlab.exe, in the Application used to perform action field, as shown below. Click Browse to look for and select the full path to matlab.exe. Here, $matlabroot represents the root directory for MATLAB--enter the full path for your installation.
  7. If you also want to open the selected M-file in the Editor/Debugger in MATLAB, you need to add this flag after the path to matlab.exe:
  1. so the entire statement is

  1. Click OK in the Editing action for type: 'MATLAB M-file' dialog box. Click OK in the Edit File Type dialog box. Then click Close in the Folder Options dialog box.

Now, when you double-click an M-file, MATLAB starts and opens the M-file in the Editor/Debugger. Use the instructions to associate additional file types with MATLAB. For example, the default file association for MAT-files might be Microsoft Access instead of MATLAB. Follow the above steps if you want MATLAB to open when you double-click MAT-files.

Starting MATLAB on UNIX Platforms

To start MATLAB on a UNIX platform, type matlab at the operating system prompt.

If you did not set up symbolic links in the installation procedure, you must enter the full pathname to start MATLAB, $matlabroot/bin/matlab, where $matlabroot is the name of your MATLAB installation directory. If you have trouble starting MATLAB, see troubleshooting information in the Installation Guide for UNIX.

After starting MATLAB, the MATLAB desktop opens. All of the desktop components that were open when you last shut down MATLAB will be opened on startup. If the DISPLAY environment variable is not set or is invalid, the desktop will not display.


Previous page  Startup and Shutdown Startup Directory for MATLAB Next page

© 1994-2005 The MathWorks, Inc.