how to get a polynomial eqn in variable i want ?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
>>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 commentaires
Réponses (1)
Star Strider
le 30 Août 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 commentaires
Voir également
Catégories
En savoir plus sur Polynomials dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!