hello,everyone.I'm new here.how can i get the whole answers of an one yuan polynomial equation using fsolve?thank you so much
조회 수: 2 (최근 30일)
이전 댓글 표시
for example: x^7+2*x^5+3*x^3+x+7=0; I process as follows: function y=f1(x) y= x^7+2*x^5+3*x^3+x+7; command: y=fsolve('f1',-1,1) there is only an answer.
댓글 수: 0
채택된 답변
Mischa Kim
2014년 5월 14일
편집: Mischa Kim
2014년 5월 14일
How about
syms x
sol = solve(x^7 + 2*x^5 + 3*x^3 + x + 7==0)
As described in the documentation, fsolve can only handle real variables. For this problem you would have to split x into real and imaginary parts.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!