MATLAB Function Reference
  Go to function:
    Search    Help Desk 
edit

Edit an M-file

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

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.

Then before starting MATLAB, run

If you set the Editor Off, use the option

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.



[ Previous | Help Desk | Next ]