Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country 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 in use and you cannot change nontunable properties, the new object is also considered "in use".

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?