Desktop Tools and Development Environment Previous page   Next Page

Using Statements from the Command History Window

You can select entries in the Command History window and then perform the following actions for the selected entries.

Action
How to Perform the Action 
Run statements in the Command Window

Double-click an entry (entries) in the Command History window to execute the statement(s) in the entries. For example, double-click edit myfile to open myfile.m in the Editor/Debugger. You can also run the statements in an entry by right-clicking the entry and selecting Evaluate Selection from the context menu, or by selecting an entry and pressing Enter or Return.

Edit and run statements in the Command Window
Select an entry or entries and then select Copy from the context menu. Paste the selection into the Command Window. Alternatively, drag the selection to the Command Window.
Then in the Command Window, edit the statements, and press Enter or Return to execute them.
Copy statements to another window
Select an entry or entries and then select Copy from the context menu. Paste the selection into an open M-file in the Editor/Debugger or any application. Alternatively, drag the selection from the Command History window to an open M-file or another application.
Create an M-file from statement(s)
Select an entry or entries and then right-click and select Create M-File from the context menu. The Editor/Debugger opens a new M-file that contains the statements you selected from the Command History window.
Create a shortcut from statement(s)
Select an entry or entries and then right-click and select Create Shortcut from the context menu. Alternatively, drag the selection to the Shortcuts toolbar. The Shortcut Editor opens and the selected statements appear in the Callback field. For more information, see Shortcuts for MATLAB--Easily Run a Group of Statements.


Previous page  Viewing Statements in the Command History Window Searching in the Command History Window Next page

© 1994-2005 The MathWorks, Inc.