function r_index = RD_index(index,offset,num_cells)
%

index_m1 = index - 1;
r_index = mod(index_m1 + offset, num_cells);
r_index = r_index + 1;
