How do I approximate the value of pi
古いコメントを表示
Here is what I have so far:
function numberPI=(-1^n)*1/(2*n+1)*3^n
s=0;
n=input('enter value of n= ');
for i=1:n
s=s+i
numberPI
end
disp(['numberPI= ',num2str(numberPI)]);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!