Command History Window

The Command History window shows a list of all commands that have been previously executed.


To re-execute any line in the Command History window, double-click that line. Shift-click to select a range of contiguous lines or Command-click to select a range of non-contiguous lines. Use Enter to execute the selected lines.

Text may also be dragged from the history window into the command window or other windows. Text that has a carriage return at the end will be executed immediately when it is dropped into the command window.

Each time MATLAB is run, a comment line is placed in the command history, loggin the date and time. This line (and other comment-only lines) is syntax-colored according to the preferred color for comments.

The command history window stores approximately 30,000 characters of text. When this limit is approached, a block of the oldest history commands are deleted. The history is stored in a file called "MATLAB Command History.m" in the Preferences folder of your System folder. It is read when MATLAB is launched, and is saved when MATLAB quits.


Return to Help Desk.