function At = thinMesh(A,rx,ry)
[Mx My] = size(A);
Mx = floor(Mx/rx);
My = floor(My/ry);
At = zeros(Mx,My);
for i = 1:Mx
    for j = 1:My
        At(i,j) = A(rx*(i-1)+1,...
                    ry*(j-1)+1);
    end
end
