Digital Signal Processing Reference
In-Depth Information
6
4
2
0
−2
−1
0
1
2
3
4
5
6
(a) Composite Sample Range n
6
4
2
0
−2
−1
0
1
2
3
4
5
6
(b) Composite Sample Range n
Figure 2.4: (a) First sequence, with postpended zeros at sample times 3, 4, and 5; (b) Second sequence,
with prepended zeros at sample times -1, 0, and 1.
We make the call
[y, n] = LVAddSeqs( [3,-2,2], [-1,0,1], [1,0,-1], [0,1,2] )
which yields y = [3,-1,2,-1] and n = [-1,0,1,2].
We can illustrate use of the function LV MultSeqs by using it to multiply the same sequences.
We thus make the call
[y, n] = LVMultSeqs( [3,-2,2], [-1,0,1], [1,0,-1], [0,1,2] )
which yields y = [0,-2,0,0] and n = [-1,0,1,2].
2.4.3 THE UNIT IMPULSE (DELTA) FUNCTION
The Unit Impuls eor Delta Function is defined as δ
= 1 when n = 0 and 0 for all other values of n .
The time of occurrence of the impulse can be shifted by a certain number of samples k using the notation
δ
[
n
]
[
n
k
since the value of the function will only be 1 when n - k =0.
The following function will plot a unit impulse at sample index n on the sample interval Nlow to
]
Nhigh .
function LVPlotUnitImpSeq(n,Nlow,Nhigh)
 
Search WWH ::




Custom Search