# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# sigwin.gausswin class

Package: sigwin

Construct Gaussian window object

## Description

### Note

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

sigwin.gausswin creates a handle to a Gaussian 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 Gaussian window of length N:

$w\left(x\right)={e}^{-\frac{1}{2}\left({\alpha }^{2}{x}^{2}/{M}^{2}\right)},\text{ }-M\le x\le M$
where M=(N-1)/2 and x is a linearly spaced vector of length N.

Equating $\alpha$ with the usual standard deviation of a Gaussian value, $\sigma$, note:

$\alpha =\frac{\left(N-1\right)}{2\sigma }$

## Construction

H = sigwin.gausswin returns a Gaussian window object H of length 64 and dispersion parameter alpha of 2.5.

H = sigwin.gausswin(Length) returns a Gaussian window object H of length Length and dispersion parameter alpha of 2.5. 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.

H = sigwin.gausswin(Length,Alpha) returns a Gaussian window object with dispersion parameter alpha. alpha requires a nonnegative real number and is inversely proportional to the standard deviation of a Gaussian value.

## Properties

 Length Gaussian 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. Alpha Width of Gaussian window. Alpha is inversely proportional to the standard deviation of a Gaussian. Larger values of Alpha produce Gaussian windows with inflection points closer to the peak value, or narrower windows. In the frequency domain, larger values of Alpha produce a Gaussian window with increased spread of the main lobe in frequency but decreased sidelobe energy.

## Methods

 generate Generates Gaussian window info Display information about Gaussian window object winwrite Save Gaussian window in ASCII file

## Copy Semantics

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

## Examples

expand all

Generate two Gaussian windows of length N = 64. Specify α values of 4 and 2. Show information about the window objects. Display the windows.

H4 = sigwin.gausswin(64,4); H2 = sigwin.gausswin(64,2); wvt = wvtool(H4,H2); legend(wvt.CurrentAxes,'\alpha=4','\alpha=2')

The window with α = 4 has a wider mainlobe and less sidelobe energy.

Generate a Gaussian window with N = 16 and α = 3. Return the window values as a column vector. Show information about the window object. Display the window.

H = sigwin.gausswin(16,3); win = generate(H)
win = 0.0111 0.0340 0.0889 0.1979 0.3753 0.6065 0.8353 0.9802 0.9802 0.8353 
wininfo = info(H)
wininfo = 4x15 char array 'Gaussian Window' '---------------' 'Length : 16 ' 'Alpha : 3 ' 
wvtool(H)

## References

harris, fredric j. “On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform.” Proceedings of the IEEE®. Vol. 66, January 1978, pp. 51–83.