フィルターのクリア

Finding roots of symbolic expression

22 ビュー (過去 30 日間)
Aleem Andrew
Aleem Andrew 2021 年 11 月 3 日
回答済み: Walter Roberson 2021 年 11 月 3 日
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?

採用された回答

Walter Roberson
Walter Roberson 2021 年 11 月 3 日
syms x
fx = x^2 + 2*x + 1
fx = 
p = sym2poly(fx)
p = 1×3
1 2 1
roots(double(p))
ans = 2×1
-1 -1

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by