  <span class="keyword">end</span>
            <span class="keyword">if</span> iter&gt;2*opts.sample
                k = Xi*test;
                ids = logical(max(((exp(test(end,:))./(1 - exp(k(1))))&lt;opts.tol).*<span class="keyword">...</span>
                    (sum(abs(dn*k-test),1)&lt;opts.tol_*opts.sample).*<span class="keyword">...</span>
                    (exp(k(1,:))&lt;1),test(end,:)==-inf));
                <span class="comment">%                 ids = logical(max((max(passive)==0),(exp(test