Approximation of Pi (Leibniz formula)

Convergence with while loops; Sigma (sum) without symsum formula


Updated 27 Nov 2021

View License

This code is explained in the following YouTube Video:
pi approximation video:
In this video I cover how to code while loops in MATLAB and running totals (recursion) for the purpose of creating a solution with convergence. The develop a code to find the approximation of pi within a user-defined tolerance (input) based on the Leibniz formula for pi.
For more of my YouTube Videos, check out my MATLAB tutorial playlist:
Also subscribe to my channel (Engineering with Dr. Kelsey Joy):

Cite As

Dr. Kelsey Joy (2023). Approximation of Pi (Leibniz formula) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes