unitquantizer
Create unitquantizer
object
Description
The unitquantizer
object describes data type properties to use
for quantization. After you create a unitquantizer
object, use
quantize
to quantize double-precision data. A
unitquantizer
object is the same as a quantizer
object except that its quantize
method quantizes
numbers within eps(q)
of +1
to exactly
+1
. You can use the unitquantizer
object to simulate
custom floating-point data types with arbitrary word length and exponent
length.
Creation
Syntax
Description
creates a
q
= unitquantizerunitquantizer
object with properties set to their default values. To
use this object to quantize values, use quantize
.
sets named properties using name-value arguments. You can specify multiple name-value
arguments. Enclose each property name in single quotes.q
= unitquantizer(Name,Value
)
sets properties using property values. Property values are unique, so you can set property
names by specifying just the property values in the command. When two values conflict,
q
= unitquantizer(Value1,Value2
)unitquantizer
sets the last property value in the list.
sets properties named in each field name with the values contained in the structure
q
= unitquantizer(s
)s
.
sets the named properties specified in the cell array of character vectors
q
= unitquantizer(pn,pv
)pn
to the corresponding values in the cell array
pv
.
You can use a combination of name-value string arguments, structures, and name-value
cell array arguments to set property values when creating a
unitquantizer
object.
Properties
Object Functions
Examples
Version History
Introduced in R2008a
See Also
quantize
| quantizer
| unitquantize
| assignmentquantizer
| reset