Number of node that is earthed (that is, at a
potential of zero)
input.node
Number of node that has current put into it (a
notional one Amp)
Value
Function currents() returns a three column matrix, each row of
which corresponds to an edge. The first two
columns show the node numbers specifying the edge, and the third shows
the current flowing along it.
Function current.matrix() uses a different method to return a
matrix of the same size as the conductance matrix L. Each
element of the returned matrix shows the current flowing along the
specified edge.
Details
The methods used by the two functions are different; see documentation for
resistance() for further details on input args 2 and 3
# NOT RUN {currents(cube(),1,7)
currents.matrix(cube(),1,7)
#check above solution: print out the currents flowing into each node: zapsmall(apply(currents.matrix(cube(),1,7),1,sum))
# }