Main Content

clone

Create duplicate System object

Description

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".

example

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.

Version History

Introduced in R2010a