Digital Signal Processing Reference
In-Depth Information
where a is a real number and n is real integer, produces a real sequence. In MathScript, to raise a number
to a single power, use the " ˆ " operator; to raise a number to a vector of powers, use the ". ˆ " operator.
To illustrate this, we can generate and plot a real exponential sequence with a = 2 and n = [0:1:6].
A suitable MathScript call is
y = 2.ˆ([0:1:6]); figure; stem(y)
As a second example, we generate and plot the real exponential sequence with a = 2 and n
=
[ -6:1:0]. A suitable call is
n = [-6:1:0]; y = 2.ˆn; figure; stem(n,y)
the results of which are shown in Fig. 2.7.
1
0.8
0.6
0.4
0.2
0
−7
−6
−5
−4
−3
−2
−1
0
1
n
Figure 2.7: A real exponential sequence formed by raising the number 2 to the powers [-6:1:0].
2.4.6 PERIODIC SEQUENCES
A sequence that repeats itself exactly is called periodic. A periodic sequence can be generated from a
given sequence S of length M by using the outer vector product of the sequence in column vector form
and a row vector of N ones. This generates an M -by- N matrix each column of which is the sequence S.
The matrix can then be converted to a single column vector using MathScript's colon operator, and the
resulting column vector is converted to a row vector by the transposition operator, the apostrophe.
 
Search WWH ::




Custom Search