Find the mean of the quantization error for the quantizer object q.
q = quantizer;
m = errmean(q)
m =
-1.5259e-05
Compare this result to 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