Main Content

StartMATLABonWindowsPlatforms

Choose one of these ways to start MATLAB®.

When you start MATLAB, it automatically adds theuserpathfolder to the search path. MATLAB also reopens any desktop components that were open when you last shut down.

To customize startup, seeSpecify Startup Options.

The MATLAB startup folder is the folder you are in when you get the MATLAB prompt. To change the default startup folder, seeMATLAB Startup Folder.

If you have trouble starting MATLAB, then seeInstallation and Licensing.

SelectMATLABIcon

On Microsoft®Windows®platforms, double-click the MATLAB icon. The termReleaserefers to your MATLAB release number; for example,R2017a.

  • Installer shortcut on your Windows desktop — Double-click the MATLAB icon.

  • Windows 10 systems —Start>All apps>MATLABRelease

  • Windows 8 systems — On the Start screen or the desktop, clickMATLABRelease.

  • Windows 7systems — If you chose to have the installer put a shortcut to the MATLAB program on the Windows Start menu, then selectStart>MATLABRelease

With this option, the startup folder is the last working folder from the previous MATLAB session or the custom path specified in theInitial working folderpreference. TheInitial working folderpreference is located in theGeneral Preferencespage of thePreferences Window.

You also can specify a custom startup folder in the MATLAB shortcut icon using theStart infield. However, this technique is the same as setting a custom path in theInitial working folderpreference. If you enter an invalid path in theStart infield, then the startup folder is unpredictable. To set a custom path in theStart infield:

  1. Right-click the shortcut icon for MATLABand selectPropertiesfrom the context menu. The Properties dialog box for MATLAB opens to theShortcutpane.

  2. In theStart infield, type the full path to a folder on your system, and then clickOK.

CallmatlabfromWindowsSystem Command Line

From the Windows system prompt, typematlab.

The startup folder is the folder in which you run thematlabcommand. To use the folder specified by theInitial working folderpreference, type:

matlab -useStartupFolderPref

CallmatlabfromMATLABCommand Prompt

If you start another MATLAB session from within MATLAB, then the startup folder is folder where you call the command:

!matlab

To display the startup folder, typepwdbefore callingmatlab.

Open File Associated withMATLAB

The MATLAB installer sets up associations between certain file types and MathWorks®products. MATLAB starts when you open one of those files. The startup folder is the folder containing the file.

For example, using theWindows Explorertool, double-click a file with a.m扩展。MATLAB开始开放s the file in the MATLAB Editor.

SelectMATLABExecutable fromWindowsExplorerTool

When you double-click thematlab.exefile from theWindows Explorer, the startup folder is one of the following:

  • The last working folder from the previous MATLAB session.

  • The custom path specified in theInitial working folderpreference.

See Also

||

Related Topics