Skip to Main Content Skip to Search
Product Documentation

Create Files from, Run, and Copy Command History Commands

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

Create a file from a statement or statements.

Select an entry or entries, and then right-click and select Create Script from the context menu. The Editor opens a new file that contains the statements you selected from the Command History window.

Run Command History commands in the Command Window

Do one of the following:

  • Double-click an entry or entries in the Command History window.

    For example, double-click edit myfile to open myfile.m in the Editor.

  • Right-click an entry and select Evaluate Selection from the context menu.

  • Select an entry and press Enter or Return.

Copy statements to another window.

Do either of the following:

  • Select an entry or entries, and then select Copy from the context menu. Paste the selection into an open file in the Editor or any application.

  • Drag the selection from the Command History window to an open file or another application.

Create a shortcut from a statement or statements.

Do either of the following:

  • Select an entry or entries, and then right-click and select Create Shortcut from the context menu.

  • Drag the selection to the Shortcuts toolbar. The Shortcut Editor opens and the selected statements appear in the Callback field.

    For more information, see Create MATLAB Shortcuts to Rerun MATLAB Commands.

  


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