User`s guide
Discrete Impulse
5-138
5Discrete Impulse
Purpose Generate a discrete impulse.
Library DSP Sources
Description The Discrete Impulse block generates an impulse (the value 1) at output
sample
D+1, where D is specified by the Delay parameter (D ≥ 0). All output
samples preceding and following sample
D+1 are zero.
When
D is a length-N vector, the block generates an M-by-N matrix output
representing N distinct channels, where frame size M is specified by the
Samples per frame parameter. The impulse for the ith channel appears at
sample
D(i)+1. For M=1, the output is sample-based; otherwise, the output is
frame-based.
The
Sample time parameter value, T
s
, specifies the output signal sample
period. The resulting frame period is M
∗T
s
.
The
Data type parameter allows you to specify an output precision of double,
single, or Boolean. Note, however, that most of the blocks in the DSP Blockset
accept only double precision inputs. Use the Simulink Data Type Conversion
block to convert integer data types to double precision. See “Working with Data
Types” in the Simulink documentation for a complete discussion of data types,
as well as a list of Simulink blocks capable of reduced-precision operations.
Example Construct the model below.
Configure the Discrete Impulse block to generate a frame-based three-channel
output of type double, with impulses at samples 1, 4, and 6 of channels 1, 2,
and 3, respectively. Use a sample period of 0.25 and a frame size of 4. The
corresponding settings should be as follows:
•
Delay = [0 3 5]
•Sample time = 0.25
•Samples per frame = 4
•Data type = Double