getPolyRoots(C,tBnd​)

버전 1.0.0.0 (6.16 KB) 작성자: Matthew Kelly
Find all roots of polynomial and derivative on a bounded interval
다운로드 수: 43
업데이트 날짜: 2016/7/9

라이선스 보기

% getPolyRoots(C,tBnd)
%
% Given a vector of polynomial coefficients in C, and a bounded interval
% tBnd, getPolyRoots() finds the roots of this polynomial and all of its
% derivatives on the given interval.
%
% INPUTS:
% C = vector of polynomial coefficients, see >>help polyval for format
% tBnd = [tLow, tUpp] = time interval of interest
%
% OUTPUTS:
% R = cell array
% R{1} = vector of roots of the polynomial C, including tBnd
% R{2} = vector of roots of the derivative of C, including tBnd
% ...
% R{n} = vector of roots of the (n-1)th derivative of C
%
% NOTES:
%
% 1) Why this function? There is clearly the matlab command roots().
%
% --> The implementation of this function is efficient for medium-order
% polynomials that have many roots which are not inside of the interval.
% In particular, it performs one root-solve per root found in R, not
% counting the boundary points. Thus, if there are no roots, then there
% is no root solve. Matlab's roots() command computes eigen-values to
% find the roots, and then you need to trim any roots not in the
% interval. This is the method that I use to validate the result of this
% function.
%
% 2) Matlab's roots() command should still be faster because they have an
% awesome vectorized implementation of eig().
%
% --> True. In many cases I suspect that the roots() method will actually
% be faster, since this code is not vectorized. My motivation is that I'm
% using this code to prototype the implementation, which I will later be
% writing up in C++ for other applications. In C++, the for loops in this
% implementation will run quickly.
%

인용 양식

Matthew Kelly (2025). getPolyRoots(C,tBnd) (https://kr.mathworks.com/matlabcentral/fileexchange/58136-getpolyroots-c-tbnd), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

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