roots_

버전 1.1.2 (1.44 KB) 작성자: Kenneth Johnson
roots_(c) works with poorly scaled polynomials and does not return zero when c(end) is nonzero.
다운로드 수: 13
업데이트 날짜: 2024/8/25

라이선스 보기

This fixes the MATLAB roots function to work with poorly scaled polynomials. For example,
c = 10.^(20:-1:0);
x = roots(c); max(abs(polyval(c,x))) % 7.647251195518823e-08
x = roots_(c); max(abs(polyval(c,x))) % 7.257804400984254e-14
This also fixes the MATLAB roots function to work with small roots. For example, roots([1,1,1,1e-32]) incorrectly gives a root of exact zero. roots_([1,1,1,1e-32]) gives the correct root of -1e-32.
(Reported as Case Number 04335183 on 30 Jun 2020 and Case Number 07198299 on 05 Aug 2024.)

인용 양식

Kenneth Johnson (2025). roots_ (https://www.mathworks.com/matlabcentral/fileexchange/84280-roots_), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2024a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.2

Fix problem with complex coefficients. (Replace find(logical(c)) with find(c~=0).)

1.1.1

Eliminate infinite roots.

1.1.0

Modified to work with poorly scaled polynomials.

1.0.1

Added tag "polynomial roots".

1.0.0