Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LOE I 1 CD- 0 Assume for a moment that we don't know how to calculate the area of a circle. Using dimensional analysis, we
LOE I 1 CD- 0 Assume for a moment that we don't know how to calculate the area of a circle. Using dimensional analysis, we can determine that 2 (4) but we don't yet know the value of the proportionality constant (from experi- ence, we can call it a). In this problem we will cleverly determine the value of A through the use of uniform distributions generated in MATLAB. Consider the geometry shown in figure 1 below. A circle of radius 1 (and therefore area ) is centered at the origin and a square of side length 2 is superimposed. The idea is that we generate a uniform distribution of points inside of the boundaries of the square. The ratio of these points which fall inside of the circle to the total number of points generated should be equal to the ratio of the area of the square over the area of the circle. This can be written as SO: area of square 1 generated points which fall inside of the square generated points which fall inside of the circle (5) area of circle (a) First, randomly generate N points (2, y) which follow a uniform distribu- tion inside of the square. (b) iterate through each of the points generated. For each point, check if it falls inside of the bounds of the circle and keep a tally. You can keep a tally of points in the circle by initiating a variable c and increment it by 1 every time a point satisfies your condition. Give your estimate of 7 for the following total number of point's in the distribution: N = 100, 1000, 10000. Generate scatter plots for each case and give distinct colors to the points which fall on either side of the boundary of the circle
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started