Main Content

winwrite

Class: sigwin.tukeywin
Namespace: sigwin

Save Tukey window in ASCII file

Syntax

winwrite(H)
winwrite(H,'filename')

Description

winwrite(H) opens a dialog to export the values of the Tukey window object to an ASCII file. The file extension .wf is automatically appended.

winwrite(H,'filename') saves the values of the Tukey window object H in the current folder as a column vector in the ASCII file 'filename'. The file extension .wf is automatically appended to filename.

Examples

expand all

Generate two Tukey windows of length N = 64:

  • The first window has α = 1/4. α is the ratio of tapered window section length to constant section length.

  • The second window has α = 3/4.

Display the two windows.

H14 = sigwin.tukeywin(64,1/4);
H34 = sigwin.tukeywin(64,3/4);

wvt = wvtool(H14,H34);
legend(wvt.CurrentAxes,'\alpha = 1/4','\alpha = 3/4')

Generate a Tukey window with length N = 16 and the default α = 1/2. Return its values as a column vector. Show information about the window object. Display the window.

H = sigwin.tukeywin(16);

win = generate(H)
win = 16×1

         0
    0.1654
    0.5523
    0.9045
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
      ⋮

wininfo = info(H)
wininfo = 4x13 char array
    'Tukey Window '
    '------------ '
    'Length  : 16 '
    'Alpha   : 0.5'

wvtool(H)