Hi all.
I am trying to convolute two time doamin signals. singal 1 is imported to matalb as a FD signal while i am creating signal2 in matlab so i do create it in TD.
I tried:
(1) convert signal1 to TD and perform direct convolution with signal2
(2)Keep signal1 in FD ,convert signal 2 to FD, and perform multipication. then convert the results back to TD
I need the final results to be in TD.
However, Both reaults dont agree. Can someone Please help me to figure out the reason?

답변 (1개)

Matt J
Matt J 2021년 5월 15일

0 개 추천

Remember, linear convolution is not the same as cyclic convolution. Make sure you do appropriate zero padding, e.g.,
x=rand(1,5);
y=rand(1,5);
conv(x,y)
ans = 1×9
0.2999 1.0313 1.7011 2.3099 2.6181 2.2161 1.5177 0.9398 0.2859
ifft( fft(x,9).*fft(y,9) ,'symmetric')
ans = 1×9
0.2999 1.0313 1.7011 2.3099 2.6181 2.2161 1.5177 0.9398 0.2859

댓글 수: 4

mzm
mzm 2021년 5월 17일
Thank you. Do you mind having a look at the script attached with the question and let me know what's wrong?
Matt J
Matt J 2021년 5월 17일
I don't see any zero-padding being done in your code.
mzm
mzm 2021년 5월 17일
How to choose the zero padding size? I mean how many zeros should I add?
Matt J
Matt J 2021년 5월 17일
it should be length(x)+length(y)-1

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

카테고리

도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

mzm
2021년 5월 14일

댓글:

2021년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by