Roots function is solving eigth order polynomial equation as fifth order.
조회 수: 5 (최근 30일)
이전 댓글 표시
I have an equation : 

Using coeffs(), i get their coefficients, flip them left to right and then use roots() function to get its zeroes.
But, when
, coeffs() function gives coeffs of non-zero terms only,
, coeffs() function gives coeffs of non-zero terms only, that is, for fliplr(coeffs(fn)) = [a,c,e,g,i]
So, when I put this coeffs() solution in roots(), it considers it as fifth order polynomial.
How can I get around this problem?
댓글 수: 2
채택된 답변
Steven Lord
2019년 9월 14일
Specify the 'All' option in your call to coeffs to return all the coefficients, even those that are 0.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!