Engee documentation

parzenwin

Parsen’s window.

Library

EngeeDSP

Syntax

Function call

  • w = parzenwin(L) — returns L- Parsen’s point window.

  • w = parzenwin(L, typeName) — also uses the argument typeName, which sets the window accuracy value w: single or double.

Arguments

Input arguments

# L — window length

+ scalar

Details

The window length specified as a positive integer.

If you specify L as a non-integer, the function will round it to the nearest integer value.
Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# typeName — type of output data

+ Float64 (by default) | Float32

Details

The type of output data specified as:

  • Float64 — use this value to return the output w with double precision.

  • Float32 — use this value to return the output w with single precision.

Типы данных

DataType

Output arguments

# w

Parsen’s window
column vector

Details

The Parsen window returned as a column vector of length L. For the equations defining the Parsen window, see Algorithms.

Examples

Parsen and Gauss windows

Details

Let’s compare the Parsen and Gauss windows generated by 64 points. Display the result using plot.

import EngeeDSP.Functions: gausswin
import EngeeDSP.Functions: parzenwin
using Plots
gw = gausswin(64)
pw = parzenwin(64)
plot(gw,
     label = "Gaussian Window",
     xlabel = "Sample Number",
     ylabel = "Amplitude",
     linewidth = 2,
     color = :blue,
     grid = true)
plot!(pw,
      label = "Parzen Window",
      linewidth = 2,
      color = :red)

parzenwin

Algorithms

Parsen windows are piecewise cubic approximations of Gaussian windows. The side lobes of the Parsen windows are falling off at a speed of .

This equation defines -the Parsen point window on the interval :

Literature

  1. Harris, Fredric J. «On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform.» Proceedings of the IEEE®. Vol. 66, January 1978, pp. 51–83.