2))/size(Y,2);
    h = h - A'*sum(Y,2)/size(Y,2);
<span class="keyword">else</span>
    G = @(x) G*x;
<span class="keyword">end</span>
</pre><h2 id="7">Loop until all sub-problems have been solved to within desired accuracy</h2><pre class="codeinput">iter = 0;
test=[];
dn=[[1:2:2*opts.sample]', ones(opts.sample,1)];
Xi=inv(dn'*dn)*dn';
tic
<span class="keyword">while</span> ~isempty(x)
</pre><pre class="codeinput">    iter = iter + 1;
</pre><h2 id="9">Projected gradient descent with exact line search update