impulse

Navigation:  Language Reference > Functions > Source >

impulse

Previous pageReturn to chapter overviewNext page

Syntax

y = impulse(x,w);

Description

Returns a pulse signal with start time x, width w and height 1/w:

time < x: y = 0

time >= x and < x+w: y = 1/w

time >= x+w: y = 0

Note: The integral (i.e the area) of an impulse is always 1. If w is chosen small, the amplitude of the impulse will be high.

Examples

x = 20, w = 0.01;

y = impulse(x,w);

Limitations

x and w must be scalars, w > 0.