function y = ProjC(x, k)
%% Projection onto Omega = {x: ||x||_0 <= k, ||x||_infty<=1e8}

n = length(x);
tmp0 = max(min(x,1e8),-1e8);
tmp2 = x.^2 - (tmp0 - x).^2;
[~,I] = sort(tmp2,'descend');
y = zeros(n,1);
y(I(1:k)) = tmp0(I(1:k));
end


