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 Solvers25
Suggested Problems
-
4171 Solvers
-
Remove any row in which a NaN appears
8746 Solvers
-
Is my wife right? Now with even more wrong husband
1337 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
859 Solvers
-
Returning a "greater than" vector
271 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!