Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

EE103L

Visualizing signal in Matlab

Assignment 2

1. For the following function:

g(t) =   3π sin (8πt +  1 .3) cos (4πt −  0 .8)esin (12πt)

create an m-file that plots the function within the window t ∈ [−1, 1] in a 3-by- 1      subplot with steps of t equal to 0 . 1,  0 .01, and 0.001. What is the period of this signal?

2. For the following function

  2 t +  10,

create an m-file that plots the function x(t) within the window t ∈ [−10, 15] . Also create a separate figure that has 4 sublpots in 2-by-2 arrangement with the following signals:

(a) x(t+2)

(b) x(t-3)

(c) x(-t)

(d) -3x(-t+4)

3. Consider the signal x(t) =   te0 .15t,      −  20 ≤  t ≤  20 . Plot

(a) The signal x(t)

(b) The even decomposition xe (t) of x(t)

(c) The odd decomposition xo (t) of x(t)

(d) The signal y(t)=xe (t)+xo (t)

4. For the signal g(x) in problem 1, calculate the energy of the signal in the window t ∈ [0 .25, 0 .75]. Also calculate the power of the signal.

5. Suppose Ndifferent musicians in an orchestra are trying to play a pure tone, a sinusoid of frequency 160 Hz . Assume the Nplayers while trying to play the pure tone (160 Hz) end up playing tones separated by Δ Hz, so the overall sound they produced is:

y(t) =   10 cos (2πfit)

where the fi are the frequencies from 159 to 161 Hz.  Generate the signal y( t),  0  ≤ t ≤  200 sec considering that each musician is playing a unique frequency . First

assume the number of musicians to be N =  51 with Δ=  0.04 Hz, and then N=101

with Δ=  0.02 Hz. Plot y( t) for the two cases on the same figure .