Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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:
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:
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:
b. 5[𝑛+5]
c. [−𝑛]∙𝑥[𝑛]−5𝑥[𝑛+5]
Live Editor:
Live Editor:
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?
Live Editor:
b. 𝑥2[𝑛]=𝑢[𝑛−20] 𝑜𝑣𝑒𝑟−50≤𝑛≤50
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 [𝑛]
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:
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