필터 지우기
필터 지우기

Taylor series while loop

조회 수: 4 (최근 30일)
George  Zimbodia
George Zimbodia 2014년 9월 24일
댓글: George Zimbodia 2014년 9월 25일
Thanks for the help!

채택된 답변

Guillaume
Guillaume 2014년 9월 24일
You code is quite good. You made three error:
  • the sign of term must change at each iteration
  • in term again, the power of x is odd (2*k+1)
term = (-1)^k * x^(2*k+1)/factorial(2*k+1);
  • Pn is the result you're calculating. It's what you want to display, not term.
  댓글 수: 1
George  Zimbodia
George Zimbodia 2014년 9월 25일
Thank you! and I forgot to change the disp(term) to disp(Pn) on my original question even though I had did so on my code!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by