https://www.mathworks.com/help/matlab/ref/conv.html?s_tid=gn_loc_drop
conv
Convolution and polynomial multiplication
Description
w = conv( returns the convolution of vectors u,v)u and v. If u and v are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials.
Examples
Create vectors u and v containing the coefficients of the polynomials
and
.
u = [1 0 1]; v = [2 7];
Use convolution to multiply the polynomials.
w = conv(u,v)
w =
2 7 2 7
w contains the polynomial coefficients for
.
Vector Convolution
Create two vectors and convolve them.
u = [1 1 1]; v = [1 1 0 0 0 1 1]; w = conv(u,v)
w =
1 2 2 1 0 1 2 2 1
The length of w is length(u)+length(v)-1, which in this example is 9.
