Accelerating the pace of engineering and science

# sigwin.gausswin class

Package: sigwin

Construct Gaussian window object

## Description

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}^{-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 in the MATLAB® Programming Fundamentals documentation.

## Examples

Compare two Gaussian windows with different alpha values:

H=sigwin.gausswin(64,4);
H1=sigwin.gausswin(64,2.5);
% Plot comparison
fwvt=wvtool(H,H1);
legend(get(fwvt,'currentaxes'),'\alpha=4','\alpha=2.5');


The main lobe is wider for alpha=4 but the window, with alpha=4, demonstrates reduced sidelobe energy.

## References

Harris, F.J. "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform," Proceedings of the IEEE®. Vol. 66, 1978, pp. 51–83.