Anonymous user
Resistor mesh: Difference between revisions
m
→{{header|Mathematica}}
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
<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[
|