MATLAB Answers

Does MATLAB allow us to define a polynomial with unknown coeffcients?

13 views (last 30 days)
abc
abc on 5 Feb 2014
Edited: Walter Roberson on 6 Feb 2014
Hi does MATLAB allow us to define a polynomial with unknown coefficients? I know the function poly2sym where we enter the array of coefficients as an input. But if I do not have coefficients? I actually need to define two polynomials with unknown coefficients and then equate their product to 1 to find all the coefficients. I know only one of the coefficients in one of the polynomials.

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 5 Feb 2014
Edited: Walter Roberson on 6 Feb 2014
syms x
a = sym('a', [3 1]);
a(3)*x^2+a(2)*x+a(1)

  4 Comments

Show 1 older comment
John D'Errico
John D'Errico on 5 Feb 2014
Walter - sym('a',3) creates a 3x3 array. To create a vector, use sym('a',[1 3]).

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!