Index-> contents reference index search Up-> SPT_HELP Window Functions winddata Prev Next SPT_HELP-> SPTFunctionsByCategory Mathematical Functions Data Manipulation Functions SignalGeneratorMain AnalogFilterFunctions FIR Filter Design Window Functions IIR Filter Design FourierFunctions Plotting Functions Histogram Functions Window Functions-> blackman blackharris3 gaussian hamming hanning kaiser nuttall triang winddata winddata Headings-> Description Example

Window an Input Matrix
 Syntax `y = winddata(x,wintype,winparam) (GAUSSIAN and KAISER)` Syntax `y = winddata(x,wintype) (All other types)` Include: `include spt\winddata.oms` See Also Other Window Functions
``` ARGUMENTS:    INPUTS:              x = MATRIX, any numerical type, coerced to DOUBLE before                  local processing.        wintype = CHAR, string.  Any case.One of ["RECTANGULAR"|                  "TRIANGULAR"|"HAMMING"|"HANNING"|"NUTTALL"|                  "BLACKMAN"|"GAUSSIAN"|"KAISER"|"BLACKHARRIS3"].                  "RECTANGULAR" simply returns original data coerced                  to DOUBLE. Any other input will return novalue.       winparam = SCALAR, any numerical type. Represents parameter                  used with "GAUSSIAN" or "KAISER" window functions.                  Optional (ignored) for any other window type.                  Coerced to DOUBLE before processing. RETURN: MATRIX, input data multiplied by requested data window.         Double precision returned. ```
Description ``` ```Apply a data window to input data. ``` ```Provides a universal interface for applying data windows input data. Data input 'x' is a MATRIX of any numerical type which is coerced to DOUBLE before local processing. Data is assumed to be arranged in columular format. The input data is element-by-element multiplied by an identically dimensioned matrix containing columular data windows of the requested type and size. Return type is DOUBLE. The row dimension of input matrix must be 2 or greater or novalue is returned. The special case of a row vector input is treated as a column vector with a row vector return. ``` ```Argument 'wintype' (required) is a CHAR specifying the desired window type, (see details below under ARGUMENTS:). It may be in any literal case. If 'wintype' is an illegal string, novalue is returned. ``` ```Argument 'winparam' is the numerical parameter required for GAUSSIAN and KAISER window types (may be omitted for all other types). Coerced to DOUBLE before local processing. A missing 'winparam' argument will cause a novalue return.

Example
Make and plot all available windows with the winddata() function. The input vector is all ones. ``` N  = 65; x  = ones(N,1); h1 = winddata(x,"blackman"); h2 = winddata(x,"blackharris3"); h3 = winddata(x,"gaussian",20d0); h4 = winddata(x,"hamming"); h5 = winddata(x,"hanning"); h6 = winddata(x,"kaiser",8d0); h7 = winddata(x,"nuttall"); h8 = winddata(x,"triangular"); t  = seq(N)-1d0; ```