| MATLAB Function Reference | Search  Help Desk |
| edit |
Syntax
edit edit fun edit file.ext edit class/fun edit private/fun edit class/private/fun
Description
edit
opens a new editor window.
edit fun
opens the M-file fun.m in the default editor.
edit file.ext
opens the specified text file.
edit class/fun, edit private/fun, or edit class/private/fun
can be used to edit a method, private function, or private method (for the class named class).
Remarks
PC Users
You also can start MATLAB's Editor/Debugger by selecting New or Open from the File menu, or by clicking the new (page icon) button or the open (folder icon) button on the toolbar. Specify the default editor for MATLAB in the Command Window. Select Preferences from the File menu. On the General page, select MATLAB's Editor/Debugger or specify another.UNIX Users
At the time when MATLAB is installed, you specify the default editor. To change the setting, edit your~home/.Xdefaults file. If the MATLAB Editor is the default, turn it off in the .Xdefaults file.
matlab*builtInEditor: Off matlab*graphicalDebugger: OffThen before starting MATLAB, run
xrdb -merge ~home/.Xdefaults
If you set the Editor Off, use the option
matlab*externalEditorCommand: $EDITOR $FILE &to control 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.
For information about saving Editor options and turning off the Editor during a MATLAB session, see the "UNIX Handbook" section in Chapter 2 of Using MATLAB.