errmean - Mean of quantization error

Syntax

m = errmean(q)

Description

m = errmean(q) returns the mean of a uniformly distributed random quantization error that arises from quantizing a signal by quantizer object q.

Examples

Find m, the mean of the quantization error for quantizer q:

q = quantizer;
m = errmean(q)

m =

   -1.525878906250000e-005

Now compare m to m_est, the sample mean 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
m_est = mean(e)          % Estimate of the error mean

m_est =

   -1.519507450175317e-005

See Also

errpdf, errvar, quantize

  


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