how to use conv() in matlab

i have an assignment due in one days where i have to calculate and plot the convolution of the two sets given in the assignment. Use the function conv() and calculate the convolution between the two sets.
X2(t)= [0 1 2 3 2 1]
H2(t)= [1 1 1 1 1 1]
  1. write x(t)and y(t) in MATLAB array forms
  2. Calculate y2(t)= x2(t) x(with a circle around it) h2(t) by MATLAB function conv()
  3. Determine the length of y2(t) by a MATLAB function (size() and length())
  4. represent the figure of x2(t), h2(t) and y2(t) on the same graph using the subplot function.

Answers (1)

Ameer Hamza
Ameer Hamza on 18 Apr 2020
This assignment is quite simple. You are allowed to use built-in functions conv(). Since it is an assignment so, I cannot give you code, but I can point you to the necessary resources to complete this assignment
Just piece them together and the assigment will can be easily completed.

5 Comments

Hey thanks for your response, I have actually read all those but been unable to put it all together. Would really appreciate it if you could put together the code for me. Thanks
Do you mean that you want Ameer to do your homework for you so that you can turn his work in as your own? And possibly risk getting into trouble with your instructor?
Help if you can. There's no trouble, my prof won't care, I'll make the necessary changes.
That is not the point. The assignment was given for your learning. Giving a complete code would kill that purpose.
I'll learn from the code I have tried all I could but wasn't able to get it going.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!