Dependent Variables

Parent Previous Next

One variable is dependent upon another if the value of a variable is defined by an equation that uses another variable. As the value of the variable in the equation is changed, so is the dependent variable. If a variable is dependent, you may not directly edit its nominal value; instead, you change its value by changing the value of the variable on which it is dependent.

Variables which do not depend on another variable for their value are independent variables. Only independent variables may be selected for a parameter sweep. To vary a dependent variable in a parameter sweep, you must select the variable on which it depends. For more details on parameter sweeps, see Parameter Sweep.

Circular Dependencies in Variables

Care should be taken when adding dependent variables to your circuit that they do not form a circular dependency. A circular dependency is formed when two variables are dependent on each other. This can happen for two variables or multiple variables. In the case of multiple variables, the dependency extends from the first variable through all the variables until the first variable is dependent upon the last.

An example of a circuit dependency would be the two equations A=2*B and B=sin(A). For variables, if the project editor detects a circular dependency, an error message appears and you are forced to correct the problem before proceeding.You need to redefine one of the variables such that it is no longer dependent on the other. A correction of the example would be A=2*B and B=sin(C).