Quantcast

Documentation Center

  • Trial Software
  • Product Updates

sigwin

Signal processing window object

Syntax

w=sigwin.window

Description

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.

Constructors

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 object
Modified Bartlett-Hanning Windowsigwin.barthannwin
Bartlett Windowsigwin.bartlett
Blackman Windowsigwin.blackman
Blackman-Harris Windowsigwin.blackmanharris
Bohman Windowsigwin.bohmanwin
Dolph-Chebyshev Windowsigwin.chebwin
Flat Top Window sigwin.flattopwin
Gaussian Windowsigwin.gausswin
Hamming Windowsigwin.hamming
Hann (Hanning) Windowsigwin.hann
Kaiser Windowsigwin.kaiser
Nuttall defined 4–term Blackman-Harris Window sigwin.nuttallwin
Parzen Window sigwin.parzenwin
Rectangular Windowsigwin.rectwin
Taylor Windowsigwin.taylorwin
Triangular Windowsigwin.triang
Tukey Windowsigwin.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

Create a default Bartlett window and view the results in the Window Visualization Tool (wvtool). See bartlett for information on Bartlett windows:

w=sigwin.bartlett

w = 
    Length: 64
      Name: 'Bartlett'

wvtool(w)

Create a 128-point Chebyshev window with 100 dB of sidelobe attenuation. (See chebwin for information on Chebyshev windows.) View the results of this and the above Bartlett window in the Window Design and Analysis Tool (wintool):

w1=sigwin.chebwin(128,100)

w1 =
 
            Length: 128
              Name: 'Chebyshev'
     SidelobeAtten: 100

wintool(w,w1)

To save the window values in a vector, use:

d = generate(w);

See Also

| |

Was this topic helpful?