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

 채택된 답변

Image Analyst
Image Analyst 2013년 7월 15일

2 개 추천

out = conv2(b, a);

추가 답변 (1개)

Rana Mahmoud
Rana Mahmoud 2020년 10월 4일

0 개 추천

yes! you can do the following:
y=conv(a, b)

댓글 수: 1

Walter Roberson
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.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2013년 7월 15일

댓글:

2020년 10월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by