How to make a function that calculate appoximate value of pi
Show older comments
Hi every one; I am going to make a function called a_pi that uses the following approximations of pi

but that function should have following specifications Instead of going to infinity, the function stops at the smallest k for which the approximation differs from pi (i.e., the value returned MATLAB’s built-‐in function) by no more than the positive scalar, delta, which is the only input argument. The first output of the function is the approximate value of π, while the second is k. (Note: if your program or the grader takes a long time, you may have created an infinite loop and need to hit Ctrl-‐C on your keyboard.) How to deal with that question.Thanks in advance for assistance..
2 Comments
Muhammad Usman Saleem
on 29 May 2015
James Tursa
on 29 May 2015
Please post what you have done so far so we can comment on it and make suggestions.
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!