Question: IN python / juptyer notebook 2 Convolution by Programming In this section you will create a function to implement convolution and you will use it

IN python / juptyer notebook
2 Convolution by Programming
In this section you will create a function to implement convolution and you will use it to verify your results in
the previous section. Coding your own function helps to deepen your understanding of the convolution process.
Create a vector x that stores samples of the function x(t) described in the previous section. Also, create
a vector t that contains the sample times of each sample in x. Begin your sampling of x(t) starting from
t=-1 seconds and end at t=1 seconds with a sampling frequency fs of 1000Hz.
Write a function called convolve that implements the convolution of two (vector) variables. Refer to your
lecture notes for the implementation. Your function should take two vectors and a sample frequency fs as
inputs and return their convolution. Be sure to explain your code with comments.
Use your convolve function to calculate the convolution of x with itself and store the result in a vector y.
Note that y should not be the same length as x. Create a new vector ty that records the sample times for
y.
Given y, use your convolve function to calculate the convolution of y with itself to get z. Create a new
vector tz that records the sample times for z.
Plot x,y, and z on different subplots of the same plot. Make sure to label your axes and title your figure.
You may want to zero pad the x and y.
Answer the following questions in your lab report.
(a) Briefly describe how your convolution function works.
(b) How closely does your plot match your analytic plot? Explain any inconsistencies.
(c) Speculate on the result if you continue convolving z with itself.
PLEASE HELP ME DO THIS IN PYTHON
 IN python / juptyer notebook 2 Convolution by Programming In this

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 Databases Questions!