What does roots/ eig do exactly?
1 次查看(过去 30 天)
显示 更早的评论
I want to write a programm on Matlab, without using implemented functions. This programm should be similiar to the Matlab function roots. But I am not sure what roots does, is there any possibility to read something like a pseudo-code of roots or eig? Or is it possible to find .m file that fullfills this conditions?
Is roots simply using the QR decomposition with shifts ?
0 个评论
采纳的回答
Sean de Wolski
2015-8-5
编辑:Sean de Wolski
2015-8-5
>>edit roots
7 个评论
James Tursa
2015-8-5
By looking at the code for roots you have that answer. It constructs a matrix where the characteristic polynomial of that matrix is your polynomial. Then it uses eig to find eigenvalues of that matrix, which will be equal to the roots of the characteristic polynomial.
更多回答(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!