Circular convolution with single element array showing error

조회 수: 5 (최근 30일)
Deepa Abraham
Deepa Abraham 2019년 1월 22일
댓글: Deepa Abraham 2019년 1월 22일
Hi ,
When I try to do circular convolution of two vectors,it shows error when one of the vectors is single element.
How do I rectify the problem? The error message is shown below:
>> s=[1];
>> q=[1 2];
>> res=cconv(s,q)
Error
Error using .* Matrix dimensions must agree.
Error in cconv (line 46)
c = ifft(fft(datawrap(a,N),N).*fft(datawrap(b,N),N));
  댓글 수: 4
KSSV
KSSV 2019년 1월 22일
Try transposing ...
Deepa Abraham
Deepa Abraham 2019년 1월 22일
Yes,
Thanks, Now no issues

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by