Finding roots of symbolic expression
50 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aleem Andrew
am 3 Nov. 2021
Beantwortet: Walter Roberson
am 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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 3 Nov. 2021
syms x
fx = x^2 + 2*x + 1
p = sym2poly(fx)
roots(double(p))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!