Resistor mesh: Difference between revisions

m
Line 1,273:
{{works with|Mathematica|8.0}}
 
<break>
Use <b>KirchhoffMatrix</b>, <b>PseudoInverse</b>, and <b>GridGraph</b> to compute the resistance between <em>any</em> two points.
 
Use <b>KirchhoffMatrix</b>, <b>PseudoInverse</b>, and <b>GridGraph</b> to compute the resistance between <em>any</em> two pointsnodes in an <em>m</em> by <em>n</em> grid to the desired precision.
 
<lang mathematica>resistanceGraph[g_, prec_:$MachinePrecision]:=
Line 1,303 ⟶ 1,305:
 
{{works with|Mathematica|9.0}}
 
Alternative implementation using <b>GridGraph</b>.
 
<break>
 
<lang mathematica>graphresistor[g_, a_, b_] :=
LinearSolve[