Problem 42670. If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Reflexively, you drop the needle on the hardwood floor. To take your mind off of the pain, you notice that the needle has a length of L cm, and the boards in your floor are all T cm apart.
Taking a break from your sewing, you decide to write out (you can't type very well just yet, since your finger still hurts!) a MATLAB script that will determine the probability of a dropped needle touches at least one line between two of your floorboards.
The inputs to your script are L (the length of the needle) and T (the thickness of the planks that make up your hardwood floor.) The output should be the probability that needle intersects at least one line between your floorboards.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
272 Solvers
-
Find the largest value in the 3D matrix
1549 Solvers
-
Getting the row and column location from a matrix
288 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
11993 Solvers
-
Multiples of a Number in a Given Range
775 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!