Digital Signal Processing Reference
In-Depth Information
2 =1
m=0, s
4
2
0
2
-
- 4
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
n
0.4
0.3
0.2
0.1
0
- 4
- 3
- 2
- 1
0
cells
1
2
3
4
Fig. 4.12 Normal random variable and its estimated PDF
Consider that the variable X (generated using the MATLAB file randn.m )isa
normal random variable with a mean value of 0 and a variance of 1. From ( 4.94 ), it
follows:
s Y ¼ a 2
m Y ¼ b ;
:
(4.95)
From ( 4.93 ) and ( 4.95 ), we get a linear transformation that has to be applied to
the normal variable X in order to obtain a normal variable with the desired mean
value and variance ( m Y and s Y , respectively) of length N
Y ¼ s Y X þ m Y :
(4.96)
Using ( 4.93 ) the MATLAB file r ¼ fnorm ( N,VA,ME ) generates the desired
normal variable r with a length of N and the given variance VA and mean value ME .
Example 4.4.2 Generate normal variables with the variance s 2
¼ 4 and four
different mean values: 6, 2, 3, 8. Estimate the corresponding PDFs.
Solution The generated variables are shown in Fig. 4.13a , and the corresponding
estimated densities are shown in Fig. 4.13b . Note that the estimated densities have
the same shape and are only shifted along the x -axis. Similarly, according to the “3 s
rule” all signals have the same range around their mean values.
Search WWH ::




Custom Search