Maclaurin Series, How can I find the answer?
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I find the answer with MATLAB in this problem? 댓글 수: 0
답변 (1개)
Sahil Jain
2021년 10월 20일
Hi. You can use a "for" loop to calculate this series as follows.
x = pi/3;
cosx = 1;
n = 10; % number of terms in the series
for i=1:n
cosx = cosx + (-1)^i*x^(2*i)/factorial(2*i);
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!