Why does matlab function "roots" sometimes give values which when substituted back in the polynomial give large values instead of zero

1 回表示 (過去 30 日間)
abc
abc 2016 年 2 月 16 日
コメント済み: John BG 2016 年 2 月 17 日
Hello everyone,
I am interested in finding the roots of single variable polynomials (the degree can be anywhere between 30 to 100 and I am interested in real roots so that is what I look at) and I use the matlab function "roots" to do that (I do ensure that the coefficients of a polynomial, ordered in descending powers.) Now, on substituting any of these roots back in the polynomial, I expect the resulting number to be very small. And that is what I observe in most cases, i.e the result I get from substituting the roots in the polynomial is of the order of 10^-13 or so. HOWEVER, in a few cases (say 10% of the cases I am using,) the resultant number is a very large number (greater than 10^16 from what I have seen so far). Can anyone explain why this happens?
  2 件のコメント
Kirby Fears
Kirby Fears 2016 年 2 月 16 日
Does roots giving any warnings in those cases?
John BG
John BG 2016 年 2 月 17 日
please hang code examples so we can reproduce your results

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by