span class="comment">%y = A*x0 + noise*(2*rand(m,1)-1);  %  Uniform noise</span>
       y = A*x0 + noise*randn(m,1);       <span class="comment">%  Gaussian noise</span>

       <span class="comment">% add some non-linearity?</span>
       <span class="comment">%y = 7*tanh(3*y/max(abs(y)));</span>

       <span class="comment">% find all posterior modes (MAP sols under a flat prior)</span>
       <span class="keyword">for</span> i = 1:Ns
           x(:) = 0;
           idx = sets{i};
           x(idx) = A(: