kex = zeros(N,2*K*L);

for( el=1; el<=L; ++el) for( k=1; k<=K; ++k) {
 i1 = 1 + ((el-1)*K + (k-1))*2;
 i1 = [i1:i1+1];
 kex(:,i1) = get_kex(el,k);
}

;;;
