Something similar to this:
V1 = 0.01234567;
V2 = 0.01234599;
mfactor = 10^(-ceil(log10(abs(V1 - V2))));
round(V1 * mfactor) / mfactor
round(V2 * mfactor) / mfactor
But not exactly this, because the above fails if the difference is 0, and is wrong for 1 (and probably is wrong for other powers of 10.) I also have not worked through all the details of the case where the two values are different signs.
There might also need to be an adjustment made for differences greater than 1.
MATLAB does not provide any specific function to round to decimal places, but there is an attempt at such a function in the File Exchange. I say "attempt" because binary floating point arithmetic is not able to exactly represent 0.1 so you can never round to exactly a decimal place.