Finding approximate real solution to a equation
17 ビュー (過去 30 日間)
古いコメントを表示
Can anyone please help me, how to find the approximate real solution to the following polynomial:
syms x
eqn=0.0941*x^3+0.1926*x-1500;
I used solve and simplify functions, but I don't get a real value.
0 件のコメント
採用された回答
Alan Stevens
2021 年 9 月 22 日
You don't need syms here. Try the roots function.
help roots
3 件のコメント
Alan Stevens
2021 年 9 月 22 日
You could try something like
coeffs = [0.0941, 0, 0.1926, -1500];
r = roots(coeffs);
indicator = find(r==real(r));
disp(r(indicator))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Polynomials についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!