copy
Class: matlab.mixin.Copyable
Package: matlab.mixin
Copy array of handle objects
Syntax
B = copy(A)
Description
B = copy(A)
copies each element in the
array of handles A
to the new array of handles B
.
The copy
method performs a copy according
to the following rules:
The
copy
method does not copyDependent
propertiesMATLAB® does not call the
copy
method recursively on any handles contained in property valuesMATLAB does not call the class constructor or property set methods during the copy operation.
B
has the same number of elements and same size asA
.B
is the same class asA
.If
A
is empty,B
is also empty.If
A
is heterogeneous,B
is also heterogeneous.If
A
contains deleted handle objects, copy creates deleted handles of the same class inB
.Dynamic properties and listeners associated with objects in
A
are not copied to objects inB
.You can call
copy
inside your classdelete
method.
Input Arguments
|
Handle object array |
Output Arguments
|
Handle object array containing copies of the objects in |
Version History
Introduced in R2011a