currents            package:ResistorArray            R Documentation

_C_a_l_c_u_l_a_t_e_s _c_u_r_r_e_n_t_s _i_n _a_n _a_r_b_i_t_r_a_r_y _r_e_s_i_s_t_o_r _a_r_r_a_y

_D_e_s_c_r_i_p_t_i_o_n:

     Calculates currents in an arbitrary resistor array

_U_s_a_g_e:

     currents(L, earth.node, input.node)
     currents.matrix(L, earth.node, input.node)

_A_r_g_u_m_e_n_t_s:

       L: Lagrangian conductance matrix

earth.node: 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)

_D_e_t_a_i_l_s:

     The methods used by the two functions are different; see manpage
     for 'resistance()' for further details on input args 2 and 3

_V_a_l_u_e:

     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.

_N_o_t_e:

     This function is essentially a simplified version of 'circuit()'.

_A_u_t_h_o_r(_s):

     Robin K. S. Hankin

_E_x_a_m_p_l_e_s:

     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))

