e search update</a></li><li><a href="#10">If max. iterations has not been reached, log consecutive error history (see function help)</a></li><li><a href="#11">If one of the nnls-sub-problems k is finished (id(k)==true), transfer k from the GPU to the output array</a></li></ul></div><pre class="codeinput"><span class="keyword">function</span> [X, G] = LS_nnls(A, Y, opts, G, x)
</pre><h2 id="2">LS_NNLS  Solver for large non-negative least-squares problems</h2><p>Solves argmin_{x&gt;=0}||y-A(x)||_2^2</p><p>Inp