We can estimate the value of pi with random number by Monte Carlo method.
Suppose we have a square of side length of 1 and a quarter of a circle which fits into the square as one can see below.
Now assume that we thow a ball into the square and get the probability of hitting the quarter circle.
The probability will be close to as the number of balls increases.
Refer to this page for more details. : https://en.wikipedia.org/wiki/Monte_Carlo_method

Solution Stats

97 Solutions

12 Solvers

Last Solution submitted on May 14, 2024

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers12

Suggested Problems

More from this Author2

Problem Tags

Community Treasure Hunt

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

Start Hunting!