matlab中关于卷积有一个这样的例子 conv([1 1 1],[1 1 1]) 运行后的结果为 1 2 3 2 1

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 23:06:33
matlab中关于卷积有一个这样的例子 conv([1 1 1],[1 1 1]) 运行后的结果为 1 2 3 2 1

matlab中关于卷积有一个这样的例子 conv([1 1 1],[1 1 1]) 运行后的结果为 1 2 3 2 1
matlab中关于卷积有一个这样的例子 conv([1 1 1],[1 1 1]) 运行后的结果为 1 2 3 2 1

matlab中关于卷积有一个这样的例子 conv([1 1 1],[1 1 1]) 运行后的结果为 1 2 3 2 1
卷积的意思简单的理解就是我们学过的多项式的乘法.
假设这个运行
conv([a b],[c d])
则结果为
ac ad+bc bd
那么上面的式子的求解过程为
conv([1 1 1],[1 1 1])
1*1=1
1*1+1*1=2
1*1+1*1+1*1=3
1*1+1*1=2
1*1=1
你可以在matlab中使用help conv来看看
CONV Convolution and polynomial multiplication.
C = CONV(A,B) convolves vectors A and B.The resulting vector is
length MAX([LENGTH(A)+LENGTH(B)-1,LENGTH(A),LENGTH(B)]).If A and B are
vectors of polynomial coefficients,convolving them is equivalent to
multiplying the two polynomials.
C = CONV(A,B,SHAPE) returns a subsection of the convolution with size
specified by SHAPE:
'full' - (default) returns the full convolution,
'same' - returns the central part of the convolution
that is the same size as A.
'valid' - returns only those parts of the convolution
that are computed without the zero-padded edges.
LENGTH(C)is MAX(LENGTH(A)-MAX(0,LENGTH(B)-1),0).