Digital Signal Processing Reference
In-Depth Information
From Example 2.6.1 and ( 2.555 ), we have:
<
1
4 2 ¼
1
2
for
2
< y <
4
;
f Y ðyÞ ¼
(2.556)
:
0
otherwise
:
The random variable and its estimated PDF are shown in Fig. 2.74 .
Exercise M.2.3 (MATLAB file: exercise_M_2_3.m ). Using the MATLAB file
rand.m which generates the uniform random variable X in the interval [0, 1],
write the MATLAB program to generate the uniform variable in the desired interval
[ R 1 , R 2 ]. Consider, for example, R 1 ¼ 2 and R 2 ¼ 4.
Solution Using the result of Example 2.6.4, we have:
Y ¼ ðR 2 R 1 ÞX þ R 1 :
(2.557)
The corresponding MATLAB file is unif.m. The transformed variable Y and its
estimated PDF are shown in Fig. 2.75 .
Exercise M.2.4 (MATLAB file: exercise_M_2_4.m ). Estimate and plot the PDF
and distribution of the uniform random variable X in the interval [0.5, 3.5].
5
4
3
2
1
100
200
300
400
500
n
600
700
800
900
0.8
0.6
0.4
0.2
0
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
3.8
4
cells
Fig. 2.74 Transformed uniform variable and its estimated PDF
 
Search WWH ::




Custom Search