how to get convolution of two polynomials

1 view (last 30 days)
t
t on 19 Feb 2014
Commented: Star Strider on 20 Feb 2014
hello
i want to multiply the following polynomials f1=[1 2 a 3 4] , f2=[0 2 3 5 1]
however, with the conv command i am getting an error due to 'a' . i have also used the command str2num to covert it but still i am not getting the multiplication any ideas?

Answers (2)

Image Analyst
Image Analyst on 20 Feb 2014
How are those polynomials? Are they coefficients of powers of x or something? Of course you wouldn't use str2num. If "a" is a variable, that should be fine as is.
a = 10; % whatever
f1=[1 2 a 3 4]
f2=[0 2 3 5 1]
output = conv(f1, f2)
In the command window:
output =
0 2 7 31 47 69 37 23 4

t
t on 20 Feb 2014
i want the result in respect of 'a'. 'a' is any integer number. you assigned a value of 10 to a.
  1 Comment
Star Strider
Star Strider on 20 Feb 2014
Setting a = 10 seems to me to fit the definition of ‘any integer number’. If it’s not the number you were thinking, you can’t fault Image Analyst for not guessing it!
I solved this for a in the Symbolic Math Toolbox, but haven’t posted it because I have no idea what you want. (There are two real and two complex values.)

Sign in to comment.

Categories

Find more on Polynomials in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!