What is the output of the following code? [code]conv([1 2],[3 4])[/code]

Tam ca

New member
What is the output of the following code?
Code:
conv([1 2],[3 4])
A. [3 10 8]
B. [8 10 3]
C. [3 8]
D. [4 6]
 
Answer: a
Explanation: The convolution of two discrete signals can be thought of as simple multiplication of the polynomials which can represent those discrete signals. However, the polynomials are represented by their coefficients with the order increasing from left to right. Hence, the above code represents the convolution of (x+2) and (3x+4) and by multiplying them we get [3 10 8] as the correct answer. Note that the answer would be represented by the aforementioned order.
 

Tìm kiếm

Back
Top