Installation guide
Other Desktop Features
Cut, Copy, Paste
,andMove
Yo u can cut and co
py a selection from a desktop tool to the clipboard and then
paste it from the
clipboard into another to ol or application. Use the Edit
menu, toolbar, c
ontext menus, or standard keyboard shortcuts. For example,
you can copy a se
lection of statements from the Command History window
and paste them i
nto some MATLAB desktop tools.
Use Paste to mov
e items copied to the clipboard from other applications.
The Paste to Wor
kspace item in the Edit menu opens the sele ction on the
clipboard in t
he Import Wizard. You can use this to copy data from another
application,
such as Excel, into MATLAB. For details, see the “Using the
Import Wizar
d”.
When editing
in the Command Window and Editor/Debugger, to move text to
anewlocatio
n, select the text and drag it. To copy text, press Ctrl and d rag
the selected
text to the new location.
To undo the m
ost recent cut, copy, or paste command, select Undo from the
Edit menu. U
se Redo to reverse the Undo. For some tools, y ou can undo
multiple ti
mes in succession.
Seealsothe
clipboard function.
Drag and Drop
Yo u can also
move or copy a selection from one tool to another by dragging the
selection
. For example, make a selectio n in the Command History window
and drag it
to the Command Window, which pastes it there. Edit the lines
in the Comm
and Window, if needed, and then press the Enter key to run
the lines f
rom the Command Window.
Another e
xample is to drag a filename from the Current Directory browser
to the Edi
tor/Debugger to open that file in the Editor/Debugger. If you drag
editable
text, for example, text in the Editor/Debugger, the text is cut rather
than copi
ed. Use Ctrl and drag to copy rather than cut editable text.
On Window
s platfo rms, you can drag items from ex ternal applications into
MATLAB.
For example, dragging text from a Microsoft Word document into
the Edit
or/Debugger cuts and pastes it into the open file. Dragging an M-file
from Win
dows Explorer to the Command Window runs the file. Similarly, you
2-51