Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

clone

Create duplicate System object

Syntax

objClone = clone(obj)

Description

example

objClone = clone(obj) creates a copy of the System object™ obj that has the same property values and states as obj. If the object you clone is locked, the new object is also locked.

Examples

collapse all

Create a Counter object and set a property.

obj = Counter;
obj.UseIncrement = false
obj = 

  Counter with properties:

    UseIncrement: false
    UseWrapValue: true
      StartValue: 1
       Increment: 1
       WrapValue: 10

Clone the object.

obj2 = clone(obj)
obj2 = 

  Counter with properties:

    UseIncrement: false
    UseWrapValue: true
      StartValue: 1
       Increment: 1
       WrapValue: 10

Input Arguments

collapse all

System object that you want to clone.

Output Arguments

collapse all

Copy of the System object that has the same properties and state as the original object.

Introduced in R2010a

Was this topic helpful?