o">    7</span>&#160;N_max = ceil(numel(x)/2);</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;counts0 = nan(N_max,1);</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;counts1 = nan(N_max,1);</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;idx_0 = 0;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;idx_1 = 0;</div><div class="line"><a name="l00012"></a><span class="lineno