by default, Matlab uses double to store numbers. if for some reason you are using int32 variables in your program, you could cast them to double:
double(a)/1e6
in case is of class int32. the format command only controls the way numbers are displayed in the command window. it does not effect the results