how to get a polynomial eqn in variable i want ?
1 view (last 30 days)
Show older comments
>>poly2sym([1 2 -1 1], s)
while using the poly2sym function as " >>poly2sym(c,y), " where c is the coeff. vector array ,i'm getting the error "undefined variable or func. y" , how do i get a pol. eqn . in variable i desire ?
0 Comments
Answers (1)
Star Strider
on 30 Aug 2014
Declare y as a symbolic variable first:
c = [1 2 -1 1]; % Polynomila Coefficients
syms y
poly2sym(c,y)
produces:
ans =
y^3 + 2*y^2 - y + 1
0 Comments
See Also
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!