Main Content

Window Designer

Design and analyze spectral windows

Description

The Window Designer app enables you to design and analyze spectral windows. Using this app, you can:

  • Display the time-domain and frequency-domain representations of one or more windows.

  • Study how the behavior of a window changes as a function of its length and other parameters.

  • Design windows graphically and export them to the MATLAB® workspace.

Window Designer app

Open the Window Designer App

  • MATLAB Toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon.

  • MATLAB command prompt: Enter windowDesigner.

Examples

expand all

Use Window Designer to specify a Bohman window of length 128 and export it to the workspace.

  1. Create a Bohman window.

    • From the Type list, select Bohman.

    • Under Length, enter 128.

    • Under Name, enter bohwin.

  2. Click Apply. The Window Viewer box shows the window in the time and frequency domains.

    Windows Designer app, showing a 128-sample Bohman window in the time domain, on the top left, and frequency domain, on the top right.

  3. Click Save to workspace. In the command line, you see this message:

    bohwin has been exported to the workspace.

  4. Verify that the new window is present in the workspace.

    whos bohwin
      Name          Size            Bytes  Class     Attributes
    
      bohwin      128x1              1024  double

Use Window Designer to see how the behavior of a Kaiser window depends on the window length and the shape parameter, β.

  1. Create a Kaiser window.

    • From the Type list, select Kaiser.

    • Under Length, enter 20.

    • Under Beta, enter 0.

    • Under Name, enter kaiser0.

  2. Click Apply. The Window Viewer box shows the window in the time and frequency domains.

  3. Click Add a new window. Create a Kaiser window of length 20 with Beta equal to 3. Name the window kaiser3 and click Apply.

  4. Click Copy window to create a third Kaiser window, kaiser6, with Beta equal to 6. Click Apply.

  5. Under Window List select the three windows.

    Windows Designer app, showing Kaiser windows with Beta parameters set to 0, 3, and 6. The windows are shown in both the time and frequency domains.

  6. Select kaiser0 from the Name list to emphasize it in the Window Viewer plots. Set Length to 10 and Beta to 6. Click Apply.

  7. Select kaiser3 from the Name list. Leave Length set to 20 and set Beta to 6. Click Apply.

  8. Select kaiser6 from the Name list. Leave Beta set to 6 and set Length to 40. Click Apply.

  9. Select kaiser3 from the Name list. Click the Turn Legend On button Turn Legend On button icon.

    Windows Designer app, showing Kaiser windows with lengths set to 10, 20, and 40. The windows are shown in both the time and frequency domains.

Use Window Designer to visualize the sidelobes of the default 64-sample Hamming window.

  1. In the View menu, clear Time domain and click Analysis Parameters.

  2. In the dialog box, specify these parameters:

    • Under Number of points, enter 8192.

    • Set Frequency Units to Hz.

    • Set Sampling Frequency to 500 Hz

    • Select Normalize Magnitude.

    Analysis Parameters window, containing a Magnitude Response box. This box lists the following parameters from top to bottom: Number of points, range, response, frequency units, frequency scale, sampling frequency, and then, the Normalize Magnitude checkbox.

  3. Click OK to close the dialog box. Click the Zoom X-Axis button Zoom X-Axis button icon. Zoom into the region between 10 Hz and 35 Hz to view the window’s first two sidelobes in detail.

    Frequency-domain representation of a Hamming window in Windows Designer app, zoomed-in across the x-axis

Related Examples

Version History

Introduced before R2006a