Desktop Tools and Development Environment Previous page   Next Page

Viewing Statements in the Command History Window

The Command History window lists statements you ran in the current session and in previous sessions. The time and date for each session appear at the top of the history of statements for that session. Use the scroll bar or the up and down arrow keys to move through the Command History window.

Click - to hide the history for a session, and click + to show it. Select a timestamp to select all entries for that session. With a timestamp selected, you can press the + or - key to show and hide entries.

The Command History window and the Command Window's statement recall feature save to the file history.m, which is stored in the same directory as MATLAB preferences. Type prefdir in the Command Window to see the location of the file. The history.m file is loaded when MATLAB starts, and it stores a maximum of 20,000 bytes, deleting the oldest entries as needed to maintain that size.

MATLAB automatically saves the history.m file throughout the session according to the Saving preference you specified. You can choose to automatically exclude certain statements from being written to the history.m file with the Settings preference. For details, see Preferences for Command History.


Previous page  Command History Using Statements from the Command History Window Next page

© 1994-2005 The MathWorks, Inc.