Write a MATLAB code to obtain the 4-level uniform quantizer for the exponential random variable with p(x) = e^(−x ) for x ≥ 0.
MATLAB code is given below in bold letters.
clc;
close all;
clear all;
% define the range of x from 0 to 5 in steps of 0.01 for
getting p(x)
x = 0:0.01:5;
% now define p(x)
p = exp(-x);
% now quanize p using 4 level quantizer
% for this first lets see the maximum and minimum values of
p(x)
% max{p(x) = 1 @ x=0 and min{p(x)} = 0 (almost) @ x =
5}
% initialize the quantized signal with zeros as
below
p_quant = zeros(size(p));
% using 4 quantization levels, the signal therefore is defined as below
for i = 1:length(x)
if(p(i)>=0 && p(i) <= 0.25)
p_quant(i) = (0+0.25)/2;
end
if(p(i)> 0.25 && p(i) <= 0.5)
p_quant(i) = (0.25+0.5)/2;
end
if(p(i)>0.5 && p(i) <= 0.75)
p_quant(i) = (0.5+0.75)/2;
end
if(p(i)> 0.75 && p(i) <= 1)
p_quant(i) = (0.75+1)/2;
end
end
figure;plot(x,p,x,p_quant,'linewidth',2);grid
on;xlabel('x');ylabel('p(x) and quantized p(x)');
legend('p(x)','quantized p(x)');axis([-1 6 -0.2 1.2]);
Write a MATLAB code to obtain the 4-level uniform quantizer for the exponential random variable w...
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*...
Part a: Write a Matlab code that generate Exponential Function. Part b Write a Matlab code that generate sinusoidal Function. Part c Write a Matlab code that generate Unit Ramp delay (shift) function
Using MATLAB, not R codes, I repeat, please, not in R, just MATLAB codes, write the complete code for: 1. Assume Y is an exponential random variable with rate parameter λ=2. (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y.
Write a MATLAB code to integrate a Gaussian random variable X with mean = 3, var = 7. The limits of integration is -10 to 10.
Problem 4. Let X be a random variable with EIXI4 < oo. Define μ1 = EX and Alk-E(X-μ)k, k 2, 3, 4, and then 03 = 쓺 (skewness), a,--2 (kurtosis) 3/2 (1) Show that if P(X- > z) = P(X-円く-r) for every x > 0, then μ3-0, but not the other way around. (2) Compute as and a when X is Binomial with parameter p, exponential with mean1, uniform on [O, 1], standard normal, and double exponential (fx (x)-(1/2)e-M).
USING MATLAB PLEASE PROVIDE THE CODE. THANK YOU
1s an exponential random variable with rate parameter 2. 1. Assume (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y
1s an exponential random variable with rate parameter 2. 1. Assume (1) Generate 1000 samples from this exponential distribution using inverse transform method (2) Compare the histogram of your samples with the true density of Y
Numerical Analysis Matlab Use single - variable method Write a matlab code to show how do you run this algorithm Given the function ƒ(x) = sin(x) - e^x + 2 Find the minimum value in [a, b]=[-1, 3]. Starting from the leftmost end point and move toward to rightmost end point (i.e forth) with your first ∆x = (b - a)/4 = (3 - (-1))/4 = 1 Stop the iteration when your ∆x ≤ 0.01
Let X be an exponential random variable such that P(X < 27) = P(X > 27). Calculate E[X|X > 23].
graph in MATLAB if possible, please. Thank you. Code would be helpful 3.4.3 The random variable Xhas CDF Fx ( 3 ) = 0 J 0.4 0.8 1 < -3, -3 < 3 < 5, 5 < x < 7, x > 7. (a) Draw a graph of the CDF.
2. Let X be an exponential random variable with rate A > 0. In this problem you will show that X satisfies the memoryless property. Let s 2 0 and t > 0. Show that P(X > t + s| X > s) = e-M