Ways to Edit, Evaluate, and Debug M-Files

There are several methods for creating, editing, evaluating, and debugging files with MATLAB® software.

Creating and Editing Files — Options

Instructions

MATLAB Editor

See Starting, Customizing, and Closing the Editor, and Saving, Printing, and Closing Files in the Editor.

You can create, open, edit and save M-files as well as other file types in the MATLAB Editor—see Creating and Editing Other Text File Types.

Any text editor, such as Emacs or vi

To specify another editor as the default for use with MATLAB software, select File > Preferences > Editor/Debugger, and for Editor, specify the Text editor. Click the Help button in the Preferences dialog box for details. Use that editor by default, or use any other editor you open. Regardless of the editor you use, you can debug M-files using the MATLAB Editor or debugging functions.

Debugging M-Files – Options

Instructions

General debugging tips

See Finding Errors, Debugging, and Correcting M-Files.

MATLAB Editor

See

MATLAB debugging functions (for use in the Command Window)

See function alternatives in Debugging Process and Features.

Use preferences for the Editor/Debugger to set up the editing and debugging environment to best meet your needs.

For information about the MATLAB language and writing M-files, see the Programming Fundamentals documentation.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS