How to convert a floating point number to fixed-point in MATLAB?
You can convert floating-point MATLAB® code to fixed-point code using the Fixed-Point Converter app or at the command line using the fiaccel function -float2fixed option. You can choose to propose data types based on simulation range data, derived (also known as static) range data, or both.