Starting from:

$30

ECE102 Homework #1

ECE102 Homework #1
100 points total.
1. (10 points) Even and odd parts.
Sketch and write the even and odd components of the following signal:
x(t) = relu(t) = (
t t ≥ 0
0 t < 0
−5.0 −2.5 0.0 2.5 5.0
t
0
2
4
x
(
t) = relu
(
t
)
1
2. (15 points) Time scaling and shifting.
(a) (10 points) Consider the following signal.
x(t)
1
-1 1 2 3 4 t
Sketch the following:
i. 1
2
x(−t/2)
ii. x(−2t − 2)
(b) (5 points) The figure below shows two signals: z(t) and y(t). Express (i) y(t) in terms
of z(t), and (ii) z(t) in terms of y(t)
2
3. (20 points) Periodic signals.
(a) (15 points) For each of the following signals, determine whether it is periodic or not. If
the signal is periodic, determine the fundamental period and frequency.
i. x1(t) = sin(5t/6 + π/3)
ii. x2(t) = cos2
(3πt)
iii. x3(t) = x1(t) + x2(t)
iv. x4(t) = e
tx1(t)
v. x5(t) = e
j(πt+1)x2(t)
(b) (5 points) A signal y(t) is periodic with period T0, and is the sum of two other signals.
y(t) = x1(t) + x2(t)
Must x1(t) and x2(t) both be periodic?
What if y(t) = x1(t) × x2(t)?
4. (25 points) Energy and power signals.
(a) (10 points) Determine whether the following signals are energy or power signals. If the
signal is an energy signal, determine its energy. If the signal is a power signal, determine
its power.
i. x(t) = e
−|t|
ii. x(t) = 1 + e
−|t|
(b) (15 points) Show the following two properties:
• If x(t) is an even signal and y(t) is an odd signal, then x(t)y(t) is an odd signal;
• If z(t) is an odd signal, then for any τ > 0 we have:
Z τ
−τ
z(t)dt = 0
Use these two properties to show that the energy of x(t) is the sum of the energy of its
even component xe(t) and the energy of its odd component xo(t) , i.e.,
Ex = Exe + Exo
Assume x(t) is a real signal.
3
5. (16 points) Euler’s identity and complex numbers.
(a) (8 points) Use Euler’s formula to prove the following identities:
i. cos2
(θ) + sin2
(θ) = 1
ii. cos(θ + ψ) = cos(θ) cos(ψ) − sin(θ) sin(ψ)
(b) (8 points) x(t) = (1 −

3j)e
j(t+2) and y(t) = 1
1+j
.
i. Compute the real and imaginary parts of x(t) and y(t).
ii. Compute the magnitude and phase of x(t) and y(t).
6. (14 points) MATLAB tasks
For this question, please include all relevant code in text format. For plots, please include
axis labels and preferably include a grid.
(a) (5 points) Task 1
Plot the waveform
x(t) = e
−t
cos(2πt)
for −10 ≤ t ≤ 10, with a step size of 0.2.
(b) (4 points) Task 2
Create a function relu(t) that implements the function from Question 1. You will
need to create a file called “relu.m” containing:
function out = relu(t)
out = 0; %replace this line with the appropriate implementation of the
%relu function.
end
Then plot the function for −5 ≤ t ≤ 5, with a step size of 0.1.
(c) (5 points) Task 3
Create functions even(t, f) and odd(t, f) that take inputs time t and function (handle) f that compute the respective even and odd parts of f(t) at points t.
For example, the square of a function could be implemented in a file square.m as:
function out = square(t, f)
out = f(t).^2;
end
and run as:
t = -10:0.5:10;
y = square(t, @relu);
where @relu is called a function handle of the function relu, and is necessary for passing
a function as input to another function.
Running plot(t, y); grid; yields the result:
4
For this question, plot the even and odd components of relu(t) for −5 ≤ t ≤ 5, with
a step size of 0.1 using the functions even(t, f) and odd(t, f). Feel free to also define and play around with arbitrary functions to look at their even and odd components.
5

More products