Main Content

errpdf

量子化誤差の確率密度関数

構文

[f,x] = errpdf(q)
f = errpdf(q,x)

説明

[f,x] = errpdf(q) は、x の値で評価された確率密度関数 f を返します。ベクトル x には、quantizer オブジェクト q による信号の量子化により発生した、一様分布するランダムな量子化誤差が含まれます。

f = errpdf(q,x) は、ベクトル x の値で評価された確率密度関数 f を返します。

メモ

信号の精度が quantizer の精度に近い場合、結果は正確ではありません。

すべて折りたたむ

q = quantizer('nearest',[4 3]);
[f,x] = errpdf(q);
subplot(211)
plot(x,f)
title('Computed PDF of the quantization error.')

Figure contains an axes object. The axes object with title Computed PDF of the quantization error. contains an object of type line.

出力プロットは、量子化誤差の確率密度関数を示します。この結果を、モンテカルロ試算の標本確率密度関数によるプロットと比較します。

 r = realmax(q);
      u = 2*r*rand(10000,1)-r;  % Original signal
      y = quantize(q,u);        % Quantized signal
      e = y - u;                % Error
      subplot(212)
      hist(e,20)
      gca.xlim = [min(x) max(x)];
      title('Estimate of the PDF of the quantization error.')

Figure contains 2 axes objects. Axes object 1 with title Computed PDF of the quantization error. contains an object of type line. Axes object 2 with title Estimate of the PDF of the quantization error. contains an object of type patch. This object represents e.

バージョン履歴

R2008a で導入