Digital Signal Processing Reference
In-Depth Information
Program 11.17. Sign function.
function sgn
¼
sgn(sgninp)
%
% Sign function
% if signp > ¼ 0 then sign ¼ 1
% else sign ¼ -1
%
if sgninp > ¼ 0
opt ¼ 1;
else
opt ¼ -1;
end
sgn ¼ opt;
11.8 PROBLEMS
11.1.
For the 3-bit midtread quantizer described in Figure 11.1 , and an analog signal range
from 2.5 to 2.5 volts, determine
a.
the quantization step size;
b.
the binary codes, recovered voltages, and quantization errors when each input is 1.6 volts
and 0.2 volt.
11.2.
For the 3-bit midtread quantizer described in Figure 11.1, and an analog signal range
from 4 to 4 volts, determine
a.
the quantization step size;
b.
the binary codes, recovered voltages, and quantization errors when each input
is 2.6 volts and 0.1 volt.
11.3.
For the 3-bit midtread quantizer described in Figure 11.1 , and an analog signal range
from 5 to 5 volts, determine
a.
the quantization step size;
b.
the binary codes, recovered voltages, and quantization errors when each input is 2.6
volts and 3.5 volts.
11.4.
For the 3-bit midtread quantizer described in Figure 11.1 , and an analog signal range
from 10 to 10 volts, determine
a.
the quantization step size;
the binary codes, recovered voltages, and quantization errors when each input is 5
volts, 0 volts, and 7.2 volts.
b.
11.5.
For the m -law compression and expanding process shown in Figure 11.3 with m ¼ 255,
a 3-bit midtread quantizer described in Figure 11.1 , and an analog signal range from 2.5
to 2.5 volts, determine the binary codes, recovered voltages, and quantization errors when
each input is 1.6 volts and 0.2 volt.
Search WWH ::




Custom Search