Depending on what your data looks like, you may be able to simply use "unwrap" on the two different dimensions.
A = unwrap(A,,1);
A = unwrap(A,,2);
This is not generally true however, to unwrap data in two dimensions may need more advanced algorithms; unfortunately these are not built into MATLAB.
Note that MathWorks does not offer support on MATLAB Central submissions. For help or comments on functions provided on MATLAB Central please contact the authors of the functions.