Contenido principal

winwrite

Class: sigwin.tukeywin
Namespace: sigwin

Save Tukey window in ASCII file

Syntax

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

Description

winwrite(H) opens a dialog box 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')

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains 2 objects of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains 2 objects of type line. These objects represent \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
    1.0000
    1.0000
    0.9045
    0.5523
    0.1654
      ⋮

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

wvtool(H)

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains an object of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains an object of type line.