MATLAB Function Reference    
edit

Edit an M-file

Graphical Interface

As an alternative to the edit function, select New or Open from the File menu in the MATLAB desktop.

Syntax

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

To specify the default editor for MATLAB, select Preferences from the File menu. On the Editor/Debugger panel, select MATLAB's Editor/Debugger or specify another.

UNIX Users

If you run MATLAB with the -nodisplay startup option, or run without the DISPLAY environment variable set, edit uses the External Editor command, meaning it does not use the MATLAB Editor/Debugger, but instead uses the default editor defined for your system in $matlabroot/X11/app-defaults/Matlab.

You can specify the editor that the edit function uses or specify editor options by adding the following line to your own .Xdefaults file, located in ~home.

where:

Then, before starting MATLAB, run

For the HP 700 platform, the default editor is instead defined in $matlabroot/toolbox/matlab/general/edit.m. To change it, open the file edit.m and edit the line

See Also

type


 echo eig