Question

For the exponential random variable with p(x) = e^(−x) for 10> x ≥ 0, obtain the 4-level uniform quantizer using MATLAB. You have to vary the step size (delta) in order to find the optimum step size that would minimize the distortion D. ( formula of distortion is found on the graph ). Note, b1 = delta, b2 = 2*delta, b3 = 3*delta, b4 = 10 and Y1 = 0.5* delta, Y2 = 1.5*delta, Y3 = 2.5*delta, Y4 = 3.5* delta.

gi D- 2 bnsio 2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code:

close all
clear
clc

delta = 0.001:0.001:5;
D_List = zeros(1, length(delta));
parfor d = 1:length(delta)
b = [delta(d)*(0:3) 10];
y = delta(d)*(0.5:1:3.5);
D = 0;
for i = 1:4
D = D + integral(@(x) ((x - y(i)).^2) .* exp(-x), b(i), b(i+1));
end
D_List(d) = D;
end

plot(delta, D_List)
xlabel('\Delta'), ylabel('D')

opt_delta = delta(D_List == min(D_List));
fprintf('Optimum delta = %.4f\n', opt_delta)

Output:

Optimum delta = 1.0310

Plot:

3.5 r 2.5 1.5 0.5 0 0.5 152 2.5 3 3.5 44.5 5

Add a comment
Know the answer?
Add Answer to:
For the exponential random variable with p(x) = e^(−x) for 10> x ≥ 0, obtain the 4-level unifo...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT