Documentation /  Analog Insydes /  Reference Manual /  Circuit and DAEObject Manipulation /

GetElementsGetEquations

3.6.4 RenameNodes

Command structure of RenameNodes.

Given a Netlist or Circuit object, RenameNodes changes node names in the top-level netlist and returns the new Netlist or Circuit object, respectively. The replacements repl are given as a single rule, a sequence of rules, or as a list of replacement rules of the form oldnodename -> newnodename. The node names can be given as symbols or as strings.

Examples

Load Analog Insydes.

In[1]:= <<AnalogInsydes`

Define a simple voltage divider.

In[2]:= net =
Netlist[
{V0, {1, 0}, V0},
{R1, {1, 2}, R1},
{R2, {2, 0}, R2}
]

Out[2]=

Show variable names.

In[3]:= GetVariables[CircuitEquations[net]]

Out[3]=

The variable of interest - the voltage at node 2 - is called V$2. To mark this variable as the output variable we rename node 2 to OUT. Then the output variable is called V$OUT.

Rename node 2 to OUT.

In[4]:= net2 = RenameNodes[net, {2 -> OUT}]

Out[4]=

Display netlist.

In[5]:= DisplayForm[net2]

Out[5]//DisplayForm=

Show variable names. Now the variable of interest is called V$OUT.

In[6]:= GetVariables[CircuitEquations[net2]]

Out[6]=

GetElementsGetEquations