What is the shape output of the following code? [code]p=conv([ones(1,100)],[ones(1,50)])[/code]

Lan Anh

New member
What is the shape output of the following code?
Code:
p=conv([ones(1,100)],[ones(1,50)])
A. A trapezoid
B. A rectangular pulse
C. A triangular pulse
D. Error
 
Answer: a
Explanation: An intuitive method to observe the shape of the output can be derived from the graphical convolution method. We observe that there are two pulses of unequal length. As the second vector starts overlapping on the first vector, the output increases. After it overlaps entirely on the first vector, the output would stay constant until the vector starts coming out and the output decreases linearly. Hence, the correct answer is a trapezoid.
 

Tìm kiếm

Back
Top