function index = c2i(N, carriers) ri = []; ri = [ri find(carriers == 0)]; carriers(ri) = []; index = mod(carriers, N) + 1;