Main Content

winwrite

Class: sigwin.taylorwin
Namespace: sigwin

Save Taylor window object values in ASCII file

Syntax

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

Description

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

winwrite(H,'filename') saves the values of the Taylor 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 a Taylor window of length N = 32 with a maximum sidelobe level of 60 dB and two constant-level sidelobes adjacent to the mainlobe. Display the window.

H = sigwin.taylorwin(32,3,60);

wvt = wvtool(H);
ax = wvt.CurrentAxes;
ax.YLim = [-50 50];

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.

Generate a Taylor window of length N = 16. Return its values as a column vector. Show information about the window object. Display the window.

H = sigwin.taylorwin(16);

win = generate(H)
win = 16×1

    0.3931
    0.5021
    0.6912
    0.9174
    1.1409
    1.3330
    1.4737
    1.5485
    1.5485
    1.4737
    1.3330
    1.1409
    0.9174
    0.6912
    0.5021
      ⋮

wininfo = info(H)
wininfo = 5×47 char array
    'Taylor Window                                  '
    '-------------                                  '
    'Length                                     : 16'
    'Number of nearly constant-level sidelobes  : 4 '
    'Maximum sidelobe level                     : 30'

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.