Engee documentation

rectpuls

Page in progress.

A discretized aperiodic rectangle.

Library

EngeeDSP

Syntax

Function call

  • y = rectpuls(t, tw) — generates a rectangle with a width of tw.

  • y = rectpuls(t) — returns a continuous, aperiodic, rectangular pulse of unit height with sampling periods specified in the array t, centered around t = 0.

Arguments

Input arguments

# t — sampling periods
Arbitrary type

Details

Sampling periods of a single rectangular pulse, specified as a vector.

Data types

Float32, Float64

# tw — rectangle width
Arbitrary type

Details

The width of the rectangle, set as a positive number.

Output arguments

# y — rectangular pulse

Details

A rectangular pulse of unit amplitude, returned as a vector.

An interval of nonzero amplitude is defined as open on the right, that is, rectpuls(-0.5)=1, whereas `rectpuls(0.5)=0'.