19.5.5 Cosine window function
The
cosine_window
command applies the cosine window function to a sequence or its segment.
cosine_window
takes one mandatory argument and one to three optional arguments:
v
, a real vector with length
n
.
Optionally, one of:
α, a real number (by default, α=1).
m
,
N
⟨,α⟩, a sequence of two integers and optionally a real number α (by default,
m
=0 and
N
=
n
).
cosine_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
=sin
α
⎛
⎜
⎜
⎝
k
π
N
−1
⎞
⎟
⎟
⎠
,
k
=0,1,…,
N
−1.
Example
listplot
(
cosine_window
([1
$1000
],1.5))