Finding roots of symbolic expression
21 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aleem Andrew
le 3 Nov 2021
Réponse apportée : Walter Roberson
le 3 Nov 2021
You cannot directly use the roots function to find the roots of a symbolic expression.
syms x
fx = x^2 + 2*x + 1
How do you find the roots of fx other than by typing the coefficients in an array?
0 commentaires
Réponse acceptée
Walter Roberson
le 3 Nov 2021
syms x
fx = x^2 + 2*x + 1
p = sym2poly(fx)
roots(double(p))
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox 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!