| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Signal Processing Toolbox |
| Contents | Index |
| Learn more about Signal Processing Toolbox |
Construct triangular window object
sigwin.triang is a triangular window object.
\sigwin.triang creates a handle to a triangular window object for use in spectral analysis and FIR filtering by the window method. Object methods enable workspace import and ASCII file export of the window values.
For N odd, the triangular window is defined as:

For N even, the triangular window is defined as:

H = sigwin.triang returns a triangular window object H of length 64.
H = sigwin.triang(Length) returns a triangular window object H of length Length. Entering a positive non-integer value for Length rounds the length to the nearest integer. Entering a 1 for Length results in a window with a single value of 1.
Length |
Triangular window length. The window length requires a positive integer. Entering a positive non-integer value for Length rounds the length to the nearest integer. Entering a 1 for Length results in a window with a single value of 1. |
| generate | Generates triangular window |
| info | Display information about triangular window |
| winwrite | Save triangular window in ASCII file |
Handle. To learn how copy semantics affect your use of the class, see Copying Objects in the MATLAB Programming Fundamentals documentation.
Default length N=64 triangular window:
H=sigwin.triang; wvtool(H);

Generate length N=128 triangular window, return values, and write ASCII file:
H=sigwin.triang(128); % Return window with generate win=generate(H); % Write ascii file in current directory % with window values winwrite(H,'triang_128')
Oppenheim, A.V., and Schafer, R.W. Discrete-time Signal Processing, Upper Saddle River, N.J: Prentice Hall, 1989, pp. 444–447.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |