Signal Processing Toolbox Help Desk

square

Purpose

Square wave generator.

Syntax

Description

square(t) generates a square wave with period for the elements of time vector t. square(t) is similar to sin(t), but it creates a square wave with peaks of instead of a sine wave.

square(t,duty) generates a square wave with specified duty cycle, duty. The duty cycle is the percent of the period in which the signal is positive.

See Also

chirp

Swept-frequency cosine generator.

cos

Cosine of vector/matrix elements (see MATLAB Function Reference).

diric

Dirichlet or periodic sinc function.

gauspuls

Gaussian-modulated sinusoidal pulse generator.

pulstran

Pulse train generator.

rectpuls

Sampled aperiodic rectangle generator.

sawtooth

Sawtooth or triangle wave generator.

sin

Sine of vector/matrix elements (see MATLAB Function Reference).

sinc

Sinc or sin(t)/t function.

tripuls

Sampled aperiodic triangle generator.



[ Previous | Help Desk | Next ]