21.5.10 Parzen window
The
parzen_window
command applies the Parzen window function to a sequence or its segment.
parzen_window
takes one mandatory argument and two optional arguments:
v
, a real vector with length
n
.
Optionally,
m
,
N
, a sequence of two integers (by default,
m
=0 and
N
=
n
).
parzen_window
returns the elementwise product of [
v
m
,
v
m
+1
,…,
v
m
+
N
−1
] and the vector
w
of length
N
defined by
w
k
=
⎧
⎪
⎪
⎨
⎪
⎪
⎩
1−6
x
k
2
⎛
⎝
1−
x
k
⎞
⎠
,
⎪
⎪
⎪
⎪
N
−1
2
−
k
⎪
⎪
⎪
⎪
≤
N
−1
4
,
2
⎛
⎝
1−
x
k
⎞
⎠
3
,
otherwise,
where
x
k
=|1−2
k
/
N
−1| for
k
=0,1,…,
N
−1.
Example
listplot
(
parzen_window
([1
$1000
]))