copy
Class: matlab.mixin.Copyable
Namespace: matlab.mixin
Copy array of handle objects
Syntax
B = copy(A)
Description
B = copy( copies each element in the array of
handles A)A to a new array of handles B.
The copy method follows these rules:
The
copymethod does not copy dependent properties.MATLAB® does not call the
copymethod recursively on any handles contained in property values.MATLAB does not call the class constructor or property set methods during the copy operation.
Bhas the same size and number of elements asA.Bis the same class asA.If
Ais empty,Bis also empty.If
Ais heterogeneous,Bis also heterogeneous.If
Acontains deleted handle objects,copycreates deleted handles of the same class inB.Dynamic properties and listeners associated with objects in
Aare not copied to objects inB.
Input Arguments
Examples
For an example of the use of copy, see Implement Copy for Handle Classes.
Version History
Introduced in R2011a