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

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.

 채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 5일
편집: Walter Roberson 2014년 2월 6일
syms x
a = sym('a', [3 1]);
a(3)*x^2+a(2)*x+a(1)

댓글 수: 4

Hi Walter.Thank you for your response. However syms a(3) gives the error of not a valid variable name.
Walter - sym('a',3) creates a 3x3 array. To create a vector, use sym('a',[1 3]).
Shruti, you must have caught my posting before I fixed it.
Thank you :)

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

추가 답변 (0개)

카테고리

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

제품

질문:

abc
2014년 2월 5일

편집:

2014년 2월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by