Associate input value with index value of quantization region
The dsp.ScalarQuantizerEncoder
object encodes each input
value by associating that value with the index value of the quantization region. Then, the
object outputs the index of the associated region.
To encode an input value by associating it with an index value of the quantization region:
Create the dsp.ScalarQuantizerEncoder
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
returns a
scalar quantizer encoder System object™, sqenc
= dsp.ScalarQuantizerEncodersqenc
. This object maps each input value to a
quantization region by comparing the input value to the user-specified boundary
points.
returns a scalar quantizer encoder object, sqenc
= dsp.ScalarQuantizerEncoder(Name,Value
)sqenc
, with
each specified property set to the specified value.
[___,
outputs the quantization error qerr
] = sqenc(___)qerr
for each input value when the
QuantizationErrorOutputPort
property is
true
.
[___,
also returns output cStatus
] = sqenc(___)cStatus
as the clipping status output port for each
input value when the Partitioning
property is
'Bounded'
and the ClippingStatusOutputPort
property is true
. If an input
value is outside the range defined by the BoundaryPoints
property, cStatus
is true
. If an input value is
inside the range, cStatus
is false
.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
This object implements the algorithm, inputs, and outputs described on the Scalar Quantizer Encoder block reference page. The object properties correspond to the block parameters.