array.resistance: Resistance between two arbitrary points on a regular lattice of
unit resistors
Description
Given two points on a regular lattice of electrical nodes joined by unit
resistors (as created by makefullmatrix()), returns the
resistance between the two points, or (optionally) the potentials of
each lattice point when unit current is fed into the first node, and the
second is earthed.
Earthed node is at \((0,0)\), second node is at
(x.offset, y.offset)
y.offset
Earthed node is at \((0,0)\), second node is at
(x.offset, y.offset)
rows.of.resistors
Number of rows of resistors in the network
(positive integer)
cols.of.resistors
Number of columns of resistors in the network
(positive integer)
give.pots
Boolean, with TRUE meaning to return a matrix
of potentials of the electrical nodes, and FALSE meaning to
return the resistance between the origin and the current input node
Details
Note that the electrical network is effectively toroidal.