Digital Signal Processing Reference
In-Depth Information
(i)
x
(
t
)
=
exp(
−
2
t
) sin(10
π
t
) for
t
≤
1
.
(ii) A periodic signal
x
(
t
) with fundamental period
T
=
5. The value
over one period is given by
x
(
t
)
=
5
t
0
≤
t
<
5
.
Use the
sawtooth
function available in M
ATLAB
to plot five
periods of
x
(
t
) over the range
−
10
≤
t
<
15
.
(iii) The unit step function
u
(
t
) over [
−
10, 10] using the
sign
function
available in M
ATLAB
.
(iv) The rectangular pulse function rect(
t
)
t
10
1
−
5
<
t
<
5
rect
=
0
elsewhere
using the unit step function implemented in (iii).
(v) A periodic signal
x
(
t
) with fundamental period
T
=
6. The value
over one period is given by
3
t
≤
1
01
<
t
≤
3
.
x
(
t
)
=
Use the
square
function available in M
ATLAB
.
1.32
(M
ATLAB
exercise) Write a M
ATLAB
function
mydecimate
with the
following format:
function [y] = mydecimate(x, M)
% MYDECIMATE: computes y[k] = x[kM]
% where
% x is a column vector containing the DT input
% signal
% M is the scaling factor greater than 1
% y is a column vector containing the DT output time
% decimated by M
In other words,
mydecimate
accepts an input signal
x
[
k
] and produces
the signal
y
[
k
]
=
x
[
kM
].
1.33
(M
ATLAB
exercise) Repeat Problem 1.30 for the transformation
y
[
k
]
=
x
[
k
/
N
]. In other words, write a M
ATLAB
function
myinterpolate
with the following format:
function [y] = myinterpolate(x, N)
% MYINTERPOLATE: computes y[k] = x[k/N]
% where
% x is a column vector containing the DT input
% signal
% N is the scaling factor greater than 1
Search WWH ::
Custom Search