Home > Applications > CopyPaste > copy.m

iFit/copy

PURPOSE ^

COPY puts a string, cell array, or numerical array into the clipboard,

SYNOPSIS ^

function copy(x,dec,sep,lf)

DESCRIPTION ^

 COPY puts a string, cell array, or numerical array into the clipboard,
 from where it can easily be imported by other programs.

 Usage:
   copy(x)
   copy(...,dec,sep,lf)

 x can be a numerical array (one or two dimensional), a cell array, a
 string, or a handle to a figure. The program does not handle other
 variable classes, such as struct etc. and also is not suitable for arrays
 with more than two dimensions.

 Optional arguments:
   dec   Single character that indicates the decimal separator. Default is
         the period ('.').
   sep   Single character that indicates how horizontal neigbors of a
         matrix or cell array are separated. Default is the tabulator code
         (char 9).
   lf    Single character that indicates how rows are separated. (lf
         stands for line feed). Default is the line feed code (char 10).

 Examples:
   copy('One small step for a man.')  pushes just this string to the
                                      clipboard.
   copy([1.2,-500])         pushes '1.2 -> -500' to the clipboard
                            (-> is the tabulator code).
   copy([1.2,-500],',','&') pushes '1,2 & -500' to the clipboard.
   f = figure; surf(membrane); copy(f) copies the figure to the clipboard.

 Note: This program was inspired by NUM2CLIP on the Mathworks file
 exchange, see http://www.mathworks.com/matlabcentral/fileexchange/8472

 This program was selected 'Pick of the Week' on March 7, 2014. :-)

 Author : Yvan Lengwiler
 Release: 1.52
 Date   : 2014-11-30

 See also PASTE, CLIPBOARD, HGEXPORT

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1