Main Content


Number of operations




noperations(q) is the number of quantization operations during a call to quantize(q,...) for quantizer object q. This value accumulates over successive calls to quantize. You reset the value of noperations to zero by issuing the command resetlog(q).

Each time any data element is quantized, noperations is incremented by one. The real and complex parts are counted separately. For example, (complex * complex) counts four quantization operations for products and two for sum, because(a+bi)*(c+di) = (a*c - b*d) + (a*d + b*c). In contrast, (real*real) counts one quantization operation.

In addition, the real and complex parts of the inputs are quantized individually. As a result, for a complex input of length 204 elements, noperations counts 408 quantizations: 204 for the real part of the input and 204 for the complex part.

If any inputs, states, or coefficients are complex-valued, they are all expanded from real values to complex values, with a corresponding increase in the number of quantization operations recorded by noperations. In concrete terms, (real*real) requires fewer quantizations than (real*complex) and (complex*complex). Changing all the values to complex because one is complex, such as the coefficient, makes the (real*real) into (real*complex), raising noperations count.

See Also


Introduced before R2006a