function Msk = mask2(N)
Msk = zeros(N,N);
parfor k1=1:N
    Msk(k1,:) = [zeros(1,k1-1) 1 2*ones(1,N-k1)];
end;  