num2int
Convert number to signed integer using quantizer
object
Syntax
Description
converts numeric values in y
= num2int(q
,x
)x
to output y
containing
integers using the data type properties specified by the fixed-point
quantizer
object q
. If x
is a
cell array containing numeric matrices, then y
will be a cell array of
the same dimension.
[y1
,y2
,…] =
num2int(q
,x1
,x2
,…) uses
q
to convert numeric values x1
,
x2
,… to integers y1
, y2
,….
Examples
Input Arguments
Algorithms
When
q
is a fixed-pointquantizer
object, f is equal tofractionlength
(q
), and x is numeric:num2int
is meaningful only for fixed-pointquantizer
objects. Whenq
is a floating-pointquantizer
object, x is returned unchanged (y = x).y
is returned as a double, but the numeric values will be integers, also known as floating-point integers or flints.
Version History
Introduced before R2006a