">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;x(end+1) = ~x(end); % Append one different bit to count correctly the last run</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;current = x(1);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;idx = 1;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;for i=2:numel(x);</div><div class="line"><a name="l0001