|See Also||Other Window Functions|
x = MATRIX, any numerical type, coerced to DOUBLE before
wintype = CHAR, string. Any case.One of ["RECTANGULAR"|
"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.
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.
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;