Matlab Assignment1 2024

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy