function [x,y] = RD_index2coords(index,n_side)
%

x = rem(index-1,n_side) + 1;
y = floor((index-1)/n_side) + 1;
