| MATLAB Environment | Search  Help Desk |
Setting the Default Editor
On Windows platforms, to specify the default editor for MATLAB, select Preferences from the File menu in the Command Window. On the General page, select MATLAB's Editor/Debugger or specify another.
For UNIX platforms, the editing and debugging features are both set On by default when MATLAB is installed. If you want to substitute a different editor (such as Emacs) or not use graphical debugging, you can turn these tools Off by setting the appropriate variable in your ~home/.Xdefaults file:
matlab*builtInEditor: Off matlab*graphicalDebugger: OffRun
xrdb -merge ~home/.Xdefaults
before starting MATLAB.
If you set the Editor Off, the option
matlab*externalEditorCommand: $EDITOR $FILE &controls what the
edit command does. MATLAB substitutes $EDITOR with the name of your default editor and $FILE with the filename. This option can be modified to any sort of command line you want.
Changing the Editor During a Session (for UNIX Platforms Only)
To turn off the builtinEditor during a MATLAB session, use
system_dependent('builtinEditor','off')
Then edit uses the editor defined for your UNIX EDITOR environment variable. To turn the MATLAB Editor/Debugger back on during the session, use
system_dependent('builtinEditor','on')
You can include the system_dependent command in your startup.m file. See the matlabrc reference page for more information.