Cast and Quantize Data
When designing fixed-point algorithms, use cast,
zeros,
ones,
eye, and
subsasgn to
separate the core algorithm from data type definitions. These
functions allow you to use double-precision, single-precision,
and fixed-point data types in the same code. Manual Fixed-Point Conversion Best Practices describes how to get
from generic MATLAB® code to an efficient fixed-point
implementation.
To simulate full-precision arithmetic using doubles and
quantize only at the output of the algorithm, use quantizenumeric.
To simulate floating-point data with arbitrary word length and
exponent length, use the quantizer
object and associated object functions.
Functions
Topics
- Transformations for Quantized Data
How to transform quantized data between representations.
- Manual Fixed-Point Conversion Best Practices
Get from generic MATLAB code to an efficient fixed-point implementation using manual fixed-point conversion.


