Question: 3 ( a ) ( ii ) : Compute the convolution integral for each pair of signals f ( t ) = 2 rect (

3(a)(ii): Compute the convolution integral for each pair of signals f(t)=2rect(t 3/2), g(t)=2r(t 1)rect(t 3/2)
Python tasks To complete the following Python tasks, we will provide you with a python function (nconv()), which numerically evaluates the convolution of two continuous-time functions. The function is defined as below: import numpy as np def nconv(x, tx, h, th):
y = np.convolve(x, h)*(th[1]- th[0])
ty = np.linspace(tx[0]+ th[0], tx[-1]+ th[-1], len(y))
return y, ty
where the inputs are:
x : input signal vector
tx: times over which x is defined
h : impulse response vector
th: times over which h is defined and the outputs are:
y : output signal vector ty: times over which y is defined.
The function is implemented with the numpy function np.convolve Link. You are encouraged to look at the details of the function. If some of the function arguments may sound alien to you, feel free to skip the details.
(a)(10 points) Use nconv() to check your result for problem 3(a)(ii) and plot the output. Use the same step size for tx and th and label the plots.
(b)(7 points) Use nconv() to convolve two unit rectangles: rect(t) rect(t). Plot the result and label the axes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!