Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab help please! Having trouble with this question.... The ratio of the area of the circular dartboard to the area of the square frame is

Matlab help please! Having trouble with this question....

image text in transcribed

The ratio of the area of the circular dartboard to the area of the square frame is

image text in transcribed

This ratio is equal to the probability of hitting the circular dartboard when directing a dart at a random point within the square frame. If N darts are thrown and land at random points within the square frame, and n of those N darts hit the circular dartboard, then we can expect that

image text in transcribed

from where ? can be approximated as image text in transcribed

In your script, model the throwing of darts at random points within the square frame by generating two random real numbers x and y per throw, each in the range from -R to R (the actual value of R you chose will not affect your approximation of ?). You can check whether a dart hit the circular dartboard by testing the condition:

image text in transcribed (dartboard hit)

Your code should keep on simulating the throwing of darts at random points within the square frame, keeping track of the total number of thrown darts (N), and the number of darts that landed on the dartboard (n), until the absolute difference between your approximated value of ? (given by n/N) and the actual value of ? falls below ?, that is, |?-4n/N| You are to write a script to approximate ? using the Monte Carlo method. First, imagine a circular dartboard of radius R concentrically placed within a square frame of side length 2R, as in the picture below 2R 5 20 12 18 14 13 6 10 2R 16 15 19 3 You are to write a script to approximate ? using the Monte Carlo method. First, imagine a circular dartboard of radius R concentrically placed within a square frame of side length 2R, as in the picture below 2R 5 20 12 18 14 13 6 10 2R 16 15 19 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

Factor the trinomial. x 2 + 4x - 32

Answered: 1 week ago