You can create new `operspec`

variables in three ways:

Using the `=`

operator results in linked variables that both point to the same underlying data. Using the `copy`

command results in an independent `operspec`

object. In this example, create `operspec`

objects both ways, and examine their behavior.

opspec1 =
Operating point specification for the Model watertank.
(Time-Varying Components Evaluated at time t=0)
States:
----------
x Known SteadyState Min Max dxMin dxMax
_ _____ ___________ ____ ___ _____ _____
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
0 false true -Inf Inf -Inf Inf
(2.) watertank/Water-Tank System/H
1 false true 0 Inf -Inf Inf
Inputs: None
----------
Outputs: None
----------

Create a new operating point specification object using assignment with the `=`

operator.

`opspec2`

is an `operspec`

object that points to the same underlying data as `opspec1`

. Because of this link, you cannot independently change properties of the two `operspec`

objects. To see this, change a property of `opspec2`

. For instance, change the initial value for the first state from 0 to 2. The change shows in the `States`

section of the display.

opspec2 =
Operating point specification for the Model watertank.
(Time-Varying Components Evaluated at time t=0)
States:
----------
x Known SteadyState Min Max dxMin dxMax
_ _____ ___________ ____ ___ _____ _____
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
2 false true -Inf Inf -Inf Inf
(2.) watertank/Water-Tank System/H
1 false true 0 Inf -Inf Inf
Inputs: None
----------
Outputs: None
----------

Examine the display of `opspec1`

to see that the corresponding property value of `opspec1`

also changes from 0 to 2.

opspec1 =
Operating point specification for the Model watertank.
(Time-Varying Components Evaluated at time t=0)
States:
----------
x Known SteadyState Min Max dxMin dxMax
_ _____ ___________ ____ ___ _____ _____
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
2 false true -Inf Inf -Inf Inf
(2.) watertank/Water-Tank System/H
1 false true 0 Inf -Inf Inf
Inputs: None
----------
Outputs: None
----------

To create an independent copy of an operating point specification, use the `copy`

command.

Now, when you change a property of `opspec3`

, `opspec1`

does not change. For instance, change the initial value for the first state from 2 to 4.

opspec3 =
Operating point specification for the Model watertank.
(Time-Varying Components Evaluated at time t=0)
States:
----------
x Known SteadyState Min Max dxMin dxMax
_ _____ ___________ ____ ___ _____ _____
(1.) watertank/PID Controller/Integrator/Continuous/Integrator
4 false true -Inf Inf -Inf Inf
(2.) watertank/Water-Tank System/H
1 false true 0 Inf -Inf Inf
Inputs: None
----------
Outputs: None
----------

In `opspec1`

, the corresponding value remains 2.

This copy behavior occurs because `operspec`

is a *handle object*. For more information about handle objects, see Handle Object Behavior.