Skip to main content
Engineering LibreTexts

11: The Edix Editor

  • Page ID
    10009
  • On a PC, creating and editing m-files is done outside of MATLAB. The Edix editor is one of the visual types of editors. It can be accessed either from DOS by using > edix filename.m or from MATLAB by using ≫ !edix filename.m. The latter will return you back to MATLAB after you quit the editor. MATLAB script files must end with a .m extension. They are also called m-files. Once in the Edix editor, a help list of the editor's commands can be displayed on the screen by typing “Alt-h.” (Note: The “Alt” key must be held down while the "h" key is depressed.) Pressing the “space” key will get you out of the help system.

    A new file is created by calling the Edix editor with a file name that has not been previously used. If the file name already exists on disc, then that file is retrieved and displayed on the screen and is ready to be edited. Since Edix is a visual editor, changes are made by moving the cursor to wherever something needs to be typed in or deleted. Once changes have been made to a file, then that file needs to be saved (written to disc) by typing “Alt-w.” When all editing is finished, you may exit from the Edix editor by typing “Alt-x.” Following are some useful Edix editor commands:

    Alt-h(F7) help-list of all the Edix commands
    Alt-w saves (writes) the file to disc
    Alt-x     exits the Edix editor
    Alt-d deletes the current line
    Alt-m (F8) the first time used, marks the beginning of a block of lines to be edited; the second time, marks the end of a block of lines to be edited and highlights this block in white; the third time, "un-marks" the highlighted block
    Alt-c makes a copy of the highlighted block at the current cursor location (can be repeated)
    Alt-m     moves the highlighted block to the current cursor location (can be repeated)
    (F5) put the cursor at the beginning of the line
    (F6) puts the cursor at the end of the line