function out=rdivy(A,DO)
D=size(A);
NN=D(1,1); N=D(1,2);
if nargin<2; error('Error - Not enough input parameters specified'), end;
if nargin>2; error('Error - too many input parameters specified'), end;


if length(DO)>NN;error('Error - vector of domain values has too large of dimensions'),end;
if length(DO)<NN;error('Error - vector of domain values has too small of dimensions'),end;


out=zeros(NN,N);
DOMAIN=DO;

for m=1:1:N
    out(1,m)= (A(2,m)-A(1,m))/(DO(2)-DO(1));
    out(NN,m)= (A(NN,m)-A(NN-1,m))/(DO(NN)-DO(NN-1));
end
    
for m=2:1:NN-1
    for n=1:1:N
        out(m,n)=(A(m+1,n)-A(m-1,n))/(DO(m+1)-DO(m-1));
    end
end


    
    