MATLAB: Grabbing number after decimal

Hi I have a dataset which has column 'specialNumber'. It has data like '1234.5, 9087.3…' and so on, I want to extract number after decimal. so for 1234.5 = 5 for example. How do i do that

Best Answer

If you know you will only have one number after the decimal, just use the rem function:
x = 1234.5;
d = 10*rem(x,1);
produces:
d =
5