Date: 20 May 2013

%x

%x

%x

%x

%x

x

Eorig5_sub = (2, 0)
xmax = 5
xmin = -5
dx = 1
eorig5_sub: (round(x(Eorig5_sub) / dx) * dx)
Eorig5 = DynamicCoordinates(Eorig5_sub, If[eorig5_sub  <  xmin, xmin, If[eorig5_sub > xmax, xmax, eorig5_sub]], 0)
Eorig4_sub = (1, 0)
eorig4_sub: (round(x(Eorig4_sub) / dx) * dx)
Eorig4 = DynamicCoordinates(Eorig4_sub, If[eorig4_sub  <  xmin, xmin, If[eorig4_sub > xmax, xmax, eorig4_sub]], 0)
Eorig3_sub = (0, 0)
eorig3_sub: (round(x(Eorig3_sub) / dx) * dx)
Eorig3 = DynamicCoordinates(Eorig3_sub, If[eorig3_sub  <  xmin, xmin, If[eorig3_sub > xmax, xmax, eorig3_sub]], 0)
Eorig2_sub = (-1, 0)
eorig2_sub: (round(x(Eorig2_sub) / dx) * dx)
Eorig2 = DynamicCoordinates(Eorig2_sub, If[eorig2_sub  <  xmin, xmin, If[eorig2_sub > xmax, xmax, eorig2_sub]], 0)
Eorig1_sub = (-2, 0)
eorig1_sub: (round(x(Eorig1_sub) / dx) * dx)
Eorig1 = DynamicCoordinates(Eorig1_sub, If[eorig1_sub  <  xmin, xmin, If[eorig1_sub > xmax, xmax, eorig1_sub]], 0)
eorig1: x(Eorig1)
eorig2: x(Eorig2)
eorig3: x(Eorig3)
eorig4: x(Eorig4)
eorig5: x(Eorig5)
eorigs: {eorig1, eorig2, eorig3, eorig4, eorig5}
n_e = 0 (slider from 0 to 5, step 1)
es = RemoveUndefined(Join[{Sort[Sequence[Element[eorigs, i], i, 1, n_e]], Sequence[xmax + 1, i, n_e + 1, 5]}])
eon = Element(es, n_e)
e4 = Element(es, 4)
e1 = Element(es, 1)
e2 = Element(es, 2)
e3 = Element(es, 3)
e5 = Element(es, 5)
ymin = -1
ymax = 1
EO1: (Element[es, 1], 0)
EO2: (Element[es, 2], 0)
EO3: (Element[es, 3], 0)
EO4: (Element[es, 4], 0)
EO5: (Element[es, 5], 0)
Eorig1stable = 1
Eorig2stable = 1
Eorig3stable = 1
Eorig4stable = 1
Eorig5stable = 1
eorigsstable: {Eorig1stable, Eorig2stable, Eorig3stable, Eorig4stable, Eorig5stable}
showne = true
xlabeldisplay: "" + (LaTeX[xlabel]) + ""
e5stable = If(n_e ≥ 5, Element[eorigsstable, IndexOf[e5, eorigs]], -1)
e4stable = If(n_e ≥ 4, Element[eorigsstable, IndexOf[e4, eorigs]], -1)
e3stable = If(n_e ≥ 3, Element[eorigsstable, IndexOf[e3, eorigs]], -1)
e2stable = If(n_e ≥ 2, Element[eorigsstable, IndexOf[e2, eorigs]], -1)
e1stable = If(n_e ≥ 1, Element[eorigsstable, IndexOf[e1, eorigs]], -1)
e1_set:-2
e2_set:-1
e3_set:0
e4_set:1
e5_set:2
e1stable_set:1
e2stable_set:1
e3stable_set:1
e4stable_set:1
e5stable_set:1