Main Content

copyElement

Class: matlab.mixin.Copyable
Namespace: matlab.mixin

Copy scalar MATLAB object

Syntax

b = copyElement(h)

Description

b = copyElement(h) makes a copy of the scalar handle h and returns a scalar handle of the same class.

The sealed matlab.mixin.Copyable copy method calls the protected copyElement method to copy each object in the array. Override copyElement in your subclass to control copy behavior.

Input Arguments

expand all

Handle to copy, specified as a scalar handle.

Output Arguments

expand all

Copy of input handle, returned as a scalar handle.

Attributes

Accessprotected

To learn about attributes of methods, see Method Attributes.

Version History

Introduced in R2011a