Sei sulla pagina 1di 10

Malabanan, Alyssa Faith D.

ECE-4202
15-25119
Laboratory Exercise 1 Part 1
General Direction: Read the problem carefully before writing your codes. You can
write a script file or a live editor file for each item.
Deliverables:
Codes and Written Report.
A. Practice generating signals. (10 points each)
1. Plot the following signals in a single figure. Live Editor:

a. 𝑥1[𝑛]=𝛿[𝑛] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10

b. 𝑥2[𝑛]=𝛿[𝑛−4] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10

c. 𝑥3[𝑛]=𝛿[𝑛+5] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10

2. Plot the following signals in a single figure.

a. 𝑥1[𝑛]=𝛿[𝑛] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10 Live Editor:

b. 𝑥2[𝑛]=𝛿[𝑛−4] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10

c. 𝑥3[𝑛]=𝛿[𝑛+5] 𝑜𝑣𝑒𝑟−10 ≤𝑛≤10


3. Plot the following signals in a single figure.

a. 𝑥1[𝑛]=0.9𝑛𝑜𝑣𝑒𝑟 0≤𝑛≤50 Live Editor:

b. 𝑥2[𝑛]=9𝑛𝑜𝑣𝑒𝑟 0≤𝑛≤50

c. 𝑥3[𝑛]=(−0.9)𝑛𝑜𝑣𝑒𝑟 0≤𝑛≤50

d. 𝑥4[𝑛]=(−9)𝑛𝑜𝑣𝑒𝑟 0≤𝑛≤50

4. Plot the real, imaginary component, magnitude and phase of the signal [𝑛]=
𝑒(−2+𝑗4)𝑛 over the interval 0≤𝑛≤30.
Live Editor:
5. Plot the signal [𝑛]=5sin(𝜋 4𝑛+𝜋 2) over the interval 0≤𝑛≤50

Live Editor:

6. Plot a 1000-point Gaussian Random Sequence and a 1000-point Uniformly


Distributed Pseudo Random Numbers in a single figure.

Live editor:
7. A sequence 𝑥[𝑛]={2,−3,4,5,0,6,−2} is a periodic in which N = 7. Plot 20 periods
of this sequence.
Live Editor:

8. Let
𝑥[𝑛]={−2,−1,0,𝟏,2,3,4,5,6,5,4,−3,2,1} .
Plot the following signals in a single
figure.

a. [𝑛−4]

b. 5[𝑛+5]

c. [𝑛−4]−5𝑥[𝑛+5]

Live editor:

9. Let 𝑥[𝑛]={−5,2,4,6,1,3,4,−5,1,8,2,−3,2,1}. Plot the following signals in a single


figure.
a. [−𝑛]

b. 5[𝑛+5]

c. [−𝑛]∙𝑥[𝑛]−5𝑥[𝑛+5]

Live Editor:

10. Find the energy of the following signals.

a. 𝑥1[𝑛]=𝑛 𝑓𝑜𝑟 0≤𝑛≤300.

b. 𝑥2[𝑛]= 0.9𝑛𝑓𝑜𝑟 0≤𝑛≤250.

c. [𝑛]=5sin(𝜋 4𝑛+𝜋 2)𝑜𝑣𝑒𝑟 0≤𝑛≤50

Live Editor:

B. Analysis from the results. (double credit)


1. Plot the following in a single figure. Answer the question that follows.
a. [𝑛]

b. 2[𝑛−1]

c. −3[𝑛−2]

d. 4[𝑛−3]

e. [𝑛]= 𝛿[𝑛]+2𝛿[𝑛−1]−3𝛿[𝑛−2]+4𝛿[𝑛−3]

f. Compare [𝑛] with [𝑛]={1,2,−3,4}. What can you say about the two sequences?
What can you conclude from this result?

*Note: you are free to choose the interval 𝑛1≤𝑛≤𝑛2

Live Editor:

2. Plot the following in a


single figure. Answer the
questions that follows.
a. 𝑥1[𝑛]=𝑢 [𝑛]𝑜𝑣𝑒𝑟−50≤𝑛≤50

b. 𝑥2[𝑛]=𝑢[𝑛−20] 𝑜𝑣𝑒𝑟−50≤𝑛≤50

c. 𝑦1[𝑛]=𝑥1[𝑛]−𝑥2[𝑛]𝑜𝑣𝑒𝑟−50≤𝑛≤50. Plot size must be twice as 𝑥1[𝑛] and 𝑥2[𝑛].

d. 𝑥3[𝑛]=𝑢[𝑛]𝑜𝑣𝑒𝑟 −50≤𝑛≤50.

e. 𝑥4[𝑛]=𝑢[−𝑛+20]𝑜𝑣𝑒𝑟−50≤𝑛≤50.

f. 𝑦2[𝑛]=𝑥3[𝑛] ∙𝑥4[𝑛]𝑜𝑣𝑒𝑟−50≤𝑛≤50.
g. What type of signal is generated? What can you conclude from this result? The
signal generated was increasing to the positive side of x and y axes.

Live Editor:

3. Generate a
signal [𝑛] using
>>rng (‘shuffle’); x = randi (20,1,100);

a. Plot [𝑛]

b. In the same figure, plot 𝑥1[𝑛]= 1 2(𝑥[𝑛]+𝑥[−𝑛])

c. In the same figure, plot 𝑥2[𝑛]= 1 2(𝑥[𝑛]−𝑥[−𝑛])

d. In the same figure, plot [𝑛]=𝑥1[𝑛]+𝑥2[𝑛]

e. Compare the plots of [𝑛] and 𝑦[𝑛]. What can you tell about the two? How about
𝑥1[𝑛] and 𝑥2[𝑛]? What can you conclude about this? The generated signal was
random.

Live Editor:

4. Plot the following in a single figure.

a. a. [𝑛]= {𝑛, 𝑓𝑜𝑟−20≤𝑛≤20 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

b. 𝑥1[𝑛]=𝑥[𝑛−15]
c. 𝑥2[𝑛]=𝑥1[−𝑛]

d. 𝑥3[𝑛]=𝑥[−𝑛]

e. 𝑥4[𝑛]=𝑥3[𝑛−15]

f. Compare 𝑥2[𝑛] 𝑎𝑛𝑑 𝑥4[𝑛]. What can you tell about the operations perform on this
two sequences? The operations has folding of graph.

Live Editor:
5. Assume [𝑛] = cos(2𝜋𝑓𝑛+𝜋 3), 0≤𝑛≤100

a. Plot [𝑛] for the following values of 𝑓;1/4,−1/3,1/6,√2/ 2,𝑒/12,𝜋/ 7.

Potrebbero piacerti anche