function [gx,gy]=matlabGid_to_matlabGxGy( gid , max_clm_idx )



gy = mod ( gid-1 , max_clm_idx ) + 1;
gx = floor ( (gid-gy) / max_clm_idx ) + 1 ;

