Desktop Tools and Development Environment Previous page   Next Page

Preferences for Command History

Using Command History preferences, you can choose to exclude statements from the history.m file and specify how often to save it. The history.m file is used for both the Command History window and statement recall in the Command Window.

To set preferences for the history.m file, select File -> Preferences, and then select Command History in the Preferences dialog box.

Settings

Specify the types of statements to exclude from the history.m file. Note that when you exclude statements from the history.m file, you cannot recall them in the Command Window as described in Recalling Previous Lines, nor can you view them in the Command History window.

Save Exit/Quit Commands

Select the check box to save exit and quit commands in the history.m file.

Save Consecutive Duplicate Commands

Select the check box if you want consecutive executions of the same statement to be saved to the history.m file.

For example, with this option selected, run magic(5), and then run magic(5) again. The history.m file saves two consecutive entries for magic(5). With this option cleared, for the same example, the command history file saves only one entry for magic(5). If you then run magic(10), the command history file saves both entries, magic(5) followed by magic(10).

Saving

Use Saving preferences to specify how often to automatically save the history.m file during a MATLAB session.

Save History File On Quit

Select this option to save the history.m file when you end the MATLAB session. If the session does not end via a normal termination, that is, via the exit or quit functions, File -> Exit MATLAB, or the MATLAB desktop Close box, the history file is not saved for that session.

Save After n Commands

Select this option to save the history.m file after n statements are added to the file. For example, when you select the option and set n to 10, after every 10 statements are added, the history file is automatically saved. Use this option if you don't want to risk losing entries to the saved history because of an abnormal termination, such as a power failure.

Don't Save History File

Select this option if you do not want to save the history.m file. This feature is useful when multiple users share the same machine and do not want other users to view the statements they have run.

See Also

Additional preferences that relate to the Command History are


Previous page  Printing the Command History Window Help for Using MATLAB Next page

© 1994-2005 The MathWorks, Inc.