DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > GIMPULSE
Generates an impulse with an optional spacing and delay.
GIMPULSE(N, spacing, offset)
N |
- |
An integer, the number of points to generate. |
spacing |
- |
A real, the spacing (delta x) between points. |
offset |
- |
Optional. A real, the location of the impulse. Defaults to 0.0. |
A series.
W1: gimpulse(100)
creates a 100-point impulse with a spacing of 1.0 such that
W1: gsin(200, .01, 1)
W2: gimpulse(200, .01)
W3: gimpulse(200, .01, .5)
W4: conv(W1, W2)
W5: conv(W1, W3)
W1 contains 200 samples of a 1 Hertz sinewave sampled at 100 samples per second.
W2 contains a 200 point impulse and W3 contains the same impulse delayed by 0.5 seconds.
W4 and W5 demonstrate the delay effect by convolving the sinewave with each impulse.
Unlike IMPULSE, GIMPULSE generates an impulse with a given DELTAX and DELAY.
If specified, 0.0 <= offset < length * deltax.
See IMPZ to calculate the impulse response of a