function [ x, y ] = matxy( dim, centreij ) % MATXY Make x-y coordinate matrices % % [ x, y ] = matxy( dim, centreij ) % 18-Oct-1999 -- created (RFM) % set default arguments defarg('centreij',floor(dim/2)+1); % check dim argument if numel(dim)==1, dim = [ dim dim ]; end % make coordinate matrices xv = (1:dim(2)) - centreij(2); yv = (1:dim(1)) - centreij(1); [x,y] = meshgrid(xv,-yv); return