Cosine window

### 21.5.5 Cosine window

The cosine_window command applies the cosine window function to a sequence or its segment.

- cosine_window takes one mandatory argument and up 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 [vm,vm+1,…,vm+N−1] and the vector w of length N defined by

  wk=sinα | ⎛ ⎜ ⎜ ⎝ |
  k π
  N−1
  | ⎞ ⎟ ⎟ ⎠ | , k=0,1,…,N−1.

#### Example

listplot(cosine_window([1$1000],1.5))