Engee documentation

rectwin

Rectangular window.

Library

EngeeDSP

Syntax

Function call

  • w = rectwin(L) — returns L-dotted rectangular window.

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

Output arguments

# w — rectangular window

+ column vector

Details

A rectangular window returned as a column vector.

Examples

Rectangular window

Details

Let’s form a rectangular window with 64 dots. Display the result using plot.

import EngeeDSP.Functions: rectwin
using Plots
w = rectwin(64)
plot(w,
     xlabel = "Sample Number",
     ylabel = "Amplitude",
     linewidth = 2,
     color = :blue,
     grid = true,
     ylim = (0, 1.2))

rectwin

Algorithms

Function output rectwin with input data L can be created using the function ones:

w = ones(L, 1)

Literature

  1. Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.