Signal Processing Toolbox | ![]() ![]() |
Syntax
x=
square(t) x=
square(t,duty)
Description
x
generates a square wave with period 2 = square(t)
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
generates a square wave with specified duty cycle, = square(t,duty)
duty
. The duty cycle is the percent of the period in which the signal is positive.
See Also
chirp |
Generate a swept-frequency cosine. |
|
Compute the cosine of vector/matrix elements (see the MATLAB documentation). |
|
Compute the Dirichlet or periodic sinc function. |
|
Generate a Gaussian-modulated sinusoidal pulse. |
|
Generate a Pulse train. |
|
Generate a sampled aperiodic rectangle. |
|
Generate a sawtooth or triangle wave. |
|
Compute the sine of vector/matrix elements (see the MATLAB documentation). |
|
Compute the sinc or sin(![]() ![]() |
|
Generate a sampled aperiodic triangle. |
![]() | sptool | ss2sos | ![]() |