Skip to Main Content Skip to Search
Product Documentation

errvar - Variance of quantization error

Syntax

v = errvar(q)

Description

v = errvar(q) returns the variance of a uniformly distributed random quantization error that arises from quantizing a signal by quantizer object q.

Examples

Find v, the variance of the quantization error for quantizer object q:

q = quantizer;
v = errvar(q)

v =

    7.761021455128987e-011

Now compare v to v_est, the sample variance from a Monte Carlo experiment:

r = realmax(q);
      u = 2*r*rand(1000,1)-r;  % Original signal
      y = quantize(q,u);     % Quantized signal
      e = y - u;           % Error
      v_est = var(e)     % Estimate of the error variance

v_est =

    7.520208858166330e-011

See Also

errmean | errpdf | quantize

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS