matlab中多项式求解是用什么算法实现的?我问的是内部的算法啊,不是matlab怎么编程.

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/15 00:26:22
matlab中多项式求解是用什么算法实现的?我问的是内部的算法啊,不是matlab怎么编程.matlab中多项式求解是用什么算法实现的?我问的是内部的算法啊,不是matlab怎么编程.matlab中多

matlab中多项式求解是用什么算法实现的?我问的是内部的算法啊,不是matlab怎么编程.
matlab中多项式求解是用什么算法实现的?
我问的是内部的算法啊,不是matlab怎么编程.

matlab中多项式求解是用什么算法实现的?我问的是内部的算法啊,不是matlab怎么编程.
r = roots(c);
Algorithm:
The algorithm simply involves computing the eigenvalues of the companion matrix:
A = diag(ones(n-1,1),-1);
A(1,:) = -c(2:n+1)./c(1);
eig(A)
It is possible to prove that the results produced are the exact eigenvalues of a matrix within roundoff error of the companion matrix A, but this does not mean that they are the exact roots of a polynomial with coefficients within roundoff error of those in c.