This is not as easy as you think it should be, because numbers are not stored in MATLAB in decimal form. As such, what does MATLAB store for the number 0.0058? Is the uncertainty 0.0001? Or is it..
The problem is, a decimal fraction is NOT stored as a decimal fraction. It is stored in binary form. When you store the number 0.0058 in MATLAB, it stores it as:
So MATLAB does not know which of those digits was the last one you provided.
Worse, even your example has a problem, because even I cannot know what you would return for some numbers as the "uncertainty".
For example, you tell us that
has an uncertainty of 1. So you might claim the last decimal digit is potentially in question. But suppose you gave a similar number, as this?
Is the uncertainty there 10? Or is it 1? Zero IS a digit after all! The number 48570 is an integer, and your argument is that an integer has an "uncertainty" of 1. Just because the last digit of that integer is a zero does not mean the zero is not known quite accurately.
Next, suppose we decide that a number has an uncertainty of 1? Divide it by 10. Is the uncertainty now 0.1? But suppose we started with the number 48570? Is the uncertainty 1? If so, then 48570/10 has an uncertainty of 0.1. But 48570/10=4857. And thet number would arguably have an uncertainty of 1, at least by some flawed logic.
The point is, once a number has been input into MATLAB, you cannot decide what the "uncertainty" (as you would define it) of those numbers would have been, purely by looking at the number as it is stored in MATLAB.
All you can do is to use eps, which tells you the size of the least significant bit in that number, as it is stored as a double. But that is NOT what you asked for.