Resistor mesh: Difference between revisions

Line 1,272:
=={{header|Mathematica}}==
Use <b>KirchhoffMatrix</b>, <b>PseudoInverse</b>, and <b>GridGraph</b> to compute the resistance between <em>any</em> two points.
{{works fromwith|Mathematica|8.0 onwards}}
<lang mathematica>
resistanceGraph[g_, prec_:$MachinePrecision]:=
Line 1,302:
 
{{works with|Mathematica|9.0}}
Alternative implementation using <b>GridGraph</b>.
<lang mathematica>graphresistor[g_, a_, b_] :=
LinearSolve[