Skip to Main Content Skip to Search
Product Documentation

clipboard - Copy and paste strings to and from system clipboard

Syntax

clipboard('copy', data)
str = clipboard('paste')
data = clipboard('pastespecial')

Description

clipboard('copy', data) sets the clipboard contents to data. If data is not a character array, the clipboard uses mat2str to convert data to a string.

str = clipboard('paste') returns the current contents of the clipboard as a string or, if MATLAB cannot convert the current clipboard contents to a string, as an empty string (' ').

data = clipboard('pastespecial') returns the current contents of the clipboard as an array by using uiimport.

Definitions

The clipboard function requires Sun Microsystems Java software.

Alternatives

Use the Import Wizard to copy data from the clipboard by choosing Edit > Paste to Workspace .

See Also

load | mat2str | uiimport

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


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