MATLAB: Floor function for int8

floorint8large matrixMATLAB

I want to round down (floor) variable defined as int8 without converting to double !
for example: a=int8(8.6);
I want the result will equal to 8 instead of 9. Is there way to do or it impossible (without converting to double) ? The reason I need it, because I work with large matrix (25000×25000) of int8.
Thanks Alex

Best Answer

Using your later example,
idivide(a,4,'floor')
does what you want there. I prefer to make both arguments integers of the same type, so I would probably have written
idivide(a,int8(4),'floor').
Note that the default option for idivide is 'fix', which might be what you want. Obviously, 'floor' and 'fix' are the same for non-negative quotients. -- Mike