Main Content

Generate Discrete Impulse with Three Channels

This example shows how to generate a discrete impulse signal with three channels and a data type of double. The Discrete Impulse block has the following settings:

  • Delay = [0 3 5]

  • Sample time = 0.25

  • Samples per frame = 4

  • Output data type = double

Run the model and look at the output, dsp_examples_yout. The first few samples of each channel are shown below:

dsp_examples_yout(1:10,:)
ans =
     1     0     0
     0     0     0
     0     0     0
     0     1     0
     0     0     0
     0     0     1
     0     0     0
     0     0     0
     0     0     0
     0     0     0

The block generates an impulse at sample 1 of channel 1 (first column), at sample 4 of channel 2 (second column), and at sample 6 of channel 3 (third column).

See Also

Blocks