Maclaurin Series, How can I find the answer?

3 ビュー (過去 30 日間)
성훈 김
성훈 김 2021 年 10 月 15 日
回答済み: Sahil Jain 2021 年 10 月 20 日
How can I find the answer with MATLAB in this problem?

回答 (1 件)

Sahil Jain
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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by