Using Monte Carlo
method to calculate the unit quarter circle area(Pi/4) in Matlab
.
-
Set the sample size in
monteCarlo.m
2 totalPointCounts = [100, 1000, 1000]
-
Run
monteCarlo.m
Sample size:
totalPointCounts = [100, 1000, 1000]
100 points:
1000 points:
10000 points:
Result: