convolution of two vector
14 次查看(过去 30 天)
显示 更早的评论
hi !
i want to convolute a vector a=[a1 a2 a3 .....an] with the vectors in this matrix
b=[B1 B2 B3....Bn]. B are vectors.
is there any smart method to make this without loops?
C=[conv(a,B1) conv(a,B2)....conv(a,Bn)]
thank you
0 个评论
采纳的回答
更多回答(1 个)
Rana Mahmoud
2020-10-4
yes! you can do the following:
y=conv(a, b)
1 个评论
Walter Roberson
2020-10-4
No, this will not work.
Notice in the original question that B is a matrix -- each is a vector and the result is a 2D array.
conv() cannot be used with a matrix, only with vectors.
You need to use conv2() instead, as shown by Image Analyst.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NaNs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!