Skip to Main Content Skip to Search
Product Documentation

Command History Window

The Command History window displays a log of statements you ran in the current and previous MATLAB sessions. The time and date for each session appear at the top of the statements listed for that session. All entries remain until you delete them, or until the command history file exceeds its maximum size of 200,000 bytes. When the file exceeds its maximum size, MATLAB automatically deletes the oldest entries. If you have an active Internet connection, you can watch the video demo, Working in the Development Environment for an overview of the major functionality.

Command History File — history.m

When you recall lines in the Command Window, MATLAB uses the command history file, history.m.

The history file:

MATLAB saves statements that run in the Command Window to the to the history file. This includes statements you run using the Evaluate Selection item on context menus in tools such as the Editor, Command History, and Help browser.

The history file does not include every action taken in MATLAB. For example, suppose you run the following statement:

a = 1:10

If you then modify the value of a in the Variable Editor, there is no record of that modification in the history.

By default, MATLAB automatically saves the command history file after each command. This allows you to more easily recover your commands and state in the event of an abnormal termination. To change when MATLAB saves the history file and adjust which statements MATLAB saves, select File > Preferences > Command History.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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