Main Content

sigwin

Signal processing window object

Syntax

w = sigwin.window

Description

Note

The use of sigwin.window is not recommended. Use the corresponding function instead. See Windows for the functional forms.

w = sigwin.window returns a window object, w, of type window. Each window type takes one or more inputs. If you specify a sigwin.window with no inputs, a default window of length 64 is created.

Note

You must specify a window type with sigwin.

Windows

window for sigwin specifies the type of window. The following table lists the supported window functions with links to the corresponding class reference page for the window object.

WindowWindow ObjectCorresponding Function
Modified Bartlett-Hann Windowsigwin.barthannwin

barthannwin

Bartlett Windowsigwin.bartlett

bartlett

Blackman Windowsigwin.blackman

blackman

Blackman-Harris Windowsigwin.blackmanharris

blackmanharris

Bohman Windowsigwin.bohmanwin

bohmanwin

Dolph-Chebyshev Windowsigwin.chebwin

chebwin

Flat Top Window sigwin.flattopwin

flattopwin

Gaussian Windowsigwin.gausswin

gausswin

Hamming Windowsigwin.hamming

hamming

Hann (Hanning) Windowsigwin.hann

hann

Kaiser Windowsigwin.kaiser

kaiser

Nuttall defined 4-term Blackman-Harris Window sigwin.nuttallwin

nuttallwin

Parzen Window sigwin.parzenwin

parzenwin

Rectangular Windowsigwin.rectwin

rectwin

Taylor Windowsigwin.taylorwin

taylorwin

Triangular Windowsigwin.triang

triang

Tukey Windowsigwin.tukeywin

tukeywin

Methods

Methods provide ways of performing functions directly on your sigwin object without having to specify the window parameters again. You can apply this method directly on the variable you assigned to your sigwin object.

Method

Description

generate

Returns a column vector of values representing the window.

info

Returns information about the window object.

winwrite

Writes an ASCII file that contains window weights for a single window object or a vector of window objects. Default filename is untitled.wf.

winwrite(Hd,filename) writes to a disk file named filename in the current working directory. The .wf extension is added automatically.

Viewing Object Parameters

As with any object, you can use get to view a sigwin object's parameters. To see a specific parameter,

 get(w,'parameter') 

or to see all parameters for an object,

get(w)

Changing Object Parameters

To set specific parameters,

set(w,'parameter1',value,'parameter2',value,...) 

Note that you must use single quotation marks around the parameter name.

Examples

collapse all

Create a default Bartlett window and view the result in wvtool. See bartlett for information on Bartlett windows.

w = sigwin.bartlett
w = 
      Name: 'Bartlett'
    Length: 64

wvtool(w)

Create a 128-point Chebyshev window with 100 dB of sidelobe attenuation. (See chebwin for information on Chebyshev windows.) View the result with wvtool.

w = sigwin.chebwin(128,100)
w = 
             Name: 'Chebyshev'
           Length: 128
    SidelobeAtten: 100

wvtool(w)

Create a Hamming window of length 12. Visualize the result.

H = sigwin.hamming(12);
wvtool(H)

Save the window values in a column vector.

d = generate(H)'
d = 1×12

    0.0800    0.1530    0.3489    0.6055    0.8412    0.9814    0.9814    0.8412    0.6055    0.3489    0.1530    0.0800

Version History

Introduced before R2006a

See Also

Apps

Functions