0% found this document useful (0 votes)
13 views2 pages

MATLAB Signals and Systems Assignment

Uploaded by

112301046
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

MATLAB Signals and Systems Assignment

Uploaded by

112301046
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EE 2050 Signals and Systems

MATLAB Assignment 1

1. Plot all questions in MATLAB© .

2. While plotting figures label the xy-axis properly and caption it.

Continuous-time Signals and Systems


Question 1
Consider the following signals

1. x1 (t) = e−t cos 2πt

2. x2 (t) = u(t)

3. x3 (t) = u(t) − u(t − 1)

and time as −2 ≥ t ≤ 2. Label x−axis and y−axis.

a) Plot the signal for time t = −2 ∶ 2

b) Now, plot for time t = −2 ∶ 0.01 ∶ 2 (∆t = 0.01) and observe the difference.

c) Plot (a) and (b) in one figure using subplot command

Question 2 (Shifting and scaling)


Consider x(t) = e−t cos(2πt)u(t), a realizable version of x1 (t) from Question 1. Plot, label and grid the
following functions:

1. x(2t + 1)

2. x(−t + 1)

3. x(2t + 1) + x(−t + 1)

Question 3 (Signal Energy)


A signal given as x(t) = e−t (u(t) − u(t − 1)), calculate the signal energy. (Note: integration is evaluated
numerically in MATLAB)

1. Compute using sum command i.e. E = sum(x(t). ∗ x(t) ∗ ∆t). (C = A ⋅ ∗B multiplies arrays A and B
by multiplying corresponding elements. See times,⋅∗)

2. Compute E using MATLAB function quad which implements a better integration technique called
recursive adaptive Simpson quadrature.

3. What is your observation on part (a) and (b).

Question 4
Repeat Question 3 for x(t) = e−t cos(2πt)u(t).

(Discrete time signals and systems)


Use stem command instead of plot and n = n1 ∶ n2 instead of t = t1 ∶ ∆t ∶ t2 .

Question 5
Sketch the following discrete-time signals:

1 P.T.O
1. xa [n] = (−0.5)n

2. xb [n] = (2)−n

3. xc [n] = (−2)n

Question 6
Sketch the discrete-time signals in two figures using subplot
π
1. x[n] = cos ( 12 n + π4 )

2. x1 [n] = e−n/5 cos(πn/5)u[n]

3. x2 [n] = x1 [−2n]

4. x3 [n] = x1 [−2n − 1]

You might also like