Products & Services Solutions Academia Support User Community Company

Learn more about Signal Processing Toolbox   

square - Square wave

Syntax

x = square(t)
x = square(t,duty)

Description

x = square(t) generates a square wave with period 2π for the elements of time vector t. square(t) is similar to sin(t), but creates a square wave with peaks of ±1 instead of a sine wave.

x = square(t,duty) generates a square wave with specified duty cycle, duty, which is a number between 0 and 100. The duty cycle is the percent of the period in which the signal is positive.

See Also

chirp, cos, diric, gauspuls, pulstran, rectpuls, sawtooth, sin, tripuls

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS