Main Content

sigwin.rectwin Class

Namespace: sigwin

Construct rectangular window object

Description

Note

The use of sigwin.rectwin is not recommended. Use rectwin instead.

sigwin.rectwin creates a handle to a rectangular window object for use in spectral analysis and FIR filtering by the window method. Object methods enable workspace import and ASCII file export of the window values.

The following equation defines the rectangular window of length N:

w(n)=1,0nN1

Construction

H = sigwin.rectwin returns a rectangular window object H of length 64.

H = sigwin.rectwin(Length) returns a rectangular window object H of length Length. Length requires a positive integer. Entering a positive noninteger value for Length rounds the length to the nearest integer. Entering a 1 for Length results in a window with a single value of 1.

Properties

Length

Rectangular window length. The window length requires a positive integer. Entering a positive noninteger value for Length rounds the length to the nearest integer. Entering a 1 for Length results in a window with a single value of 1.

Methods

generateGenerates rectangular window
infoDisplay information about rectangular window object
winwriteSave rectangular window in ASCII file

Copy Semantics

Handle. To learn how copy semantics affect your use of the class, see Copying Objects in the MATLAB® Programming Fundamentals documentation.

Examples

collapse all

Generate a rectangular window of length N = 16. Return its values as a column vector. Show information about the window object. Display the window.

H = sigwin.rectwin(16);

win = generate(H)
win = 16×1

     1
     1
     1
     1
     1
     1
     1
     1
     1
     1
      ⋮

wininfo = info(H)
wininfo = 3x18 char array
    'Rectangular Window'
    '------------------'
    'Length  : 16      '

wvtool(H)

References

Oppenheim, Alan V., and Ronald W. Schafer. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1989.