###
Forward wave already on line, +1 reflection at right, -1 at left

vx = [ 0 0 0 0 0 0 0 0 .5 1 1 1 1 1 1 1 1 1 1 1 0.5 ];

xlineani(0,1e6,0,vx,vx)

###
Initial voltage on line, no initial current, so wave head in both directions.

###
+1 reflection at right, -1 at left

vx = [ 0 0 0 0 0 0 0 0 .5 1 1 1 1 1 1 1 1 1 1 1 0.5 ];

xlineani(0,1e6,0,vx)

###
Homework problem 2.

xlineani(1,0.5,ones(1,200),0,0)

###
Homework problem 3.

xlineani(0.5,0.5,2*ones(1,200),0,0)

###
Discharging a capacitor.

xlineani(1e6,4,0,ones(1,40)*2)

###
Sinusoidal input

xlineani(1,10,2*sin(.2*(1:200)))