
% Add state 3 to left_state and right_state since it really is there
% but just an if/then statement in the control program...
% Since each tick is 0.02 seconds and swing tot_swing_time is 0.52 seconds,
% skip first 26 ticks and then look at next 20 ticks (0.4 seconds)...
 
for(i=1:x_end-x_begin+1)
   if (left_state(i)==2)
      for (j=i+26:i+27)
	 if (j < x_end-x_begin+1)
	    if (left_state(j) == 2)  left_state(j) = 3; end; end;
      end;
   end;
end;

for(i=1:x_end-x_begin+1)
   if (right_state(i)==2)
      for (j=i+25:i+26)
	 if (j < x_end-x_begin+1)
	    if (right_state(j) == 2)  right_state(j) = 3; end; end;
      end;
   end;
end;
