필터 지우기
필터 지우기

Can anyone explain this output of 1d conv() function?

조회 수: 2 (최근 30일)
Ba Ba Black Sheep!
Ba Ba Black Sheep! 2018년 10월 27일
댓글: Bruno Luong 2018년 10월 27일
>> u = [1 2 3];
>> v = [1 2 3];
>> w = conv(u, v)
w = 1 4 10 12 9
>>
Can anyone explain this output?
Question #1. How come two vectors of 3 elements generate 5 elements' output?
Question #2. How is the output being calculated?
  댓글 수: 1
Bruno Luong
Bruno Luong 2018년 10월 27일
The questions is precisely answered if you type
>> doc conv
and read

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

답변 (1개)

Stephan
Stephan 2018년 10월 27일
편집: Stephan 2018년 10월 27일
Hi,
using:
conv([1,2,3],[1,2,3])
is the equivalent to multiply two polynomials:
(1*x^2 + 2*x + 3) * (1*x^2 + 2*x + 3)
If you simplify this (do the multiplication) you get:
1*x^4 + 4*x^3 + 10*x^2 + 12*x + 9
The coefficient matrix of this resulting polynomial is
[1 4 10 12 9]
which is the same as the result of
conv([1,2,3],[1,2,3])
See also the conv documentation for more detailed informations.
Best regards
Stephan

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by