Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. When cutting a 2 x 4 timber column for use in building a house, the position of the saw blade as it cuts through

image text in transcribed
3. When cutting a 2" x 4" timber column for use in building a house, the position of the saw blade as it cuts through the material may be given by the expression: Xi+1 = xi + s where xi is the current position of the sawblade in the material, Xi+1 is the position of the sawblade in the material after making a cutting pass with the saw, and the length s is the distance you cut through the material with one pass of the saw blade. Assume that each time you make a pass with the blade, you randomly cut through between 0.3 and 0.5 inches of material. You wish to know how many passes of the saw are required to cut through the long side of the 2" x 4" section, on average. a First, write a script that uses a while loop which calculates how many passes of the saw are required to cut through the 4" long section of the 2" x 4" cross-section. You should start at a position of O, then randomly add between 0.3 and 0.5 inches to the position of your blade, counting the number of passes required as you go, until you reach 4 inches of length. You can generate the random cutting depth with the commands = randi ([30,50])/100. b. Then, once your while loop is working, incorporate a for loop that executes the calculation in part (a) 1000 times. c. Finally, using the code, determine how many passes of the saw it will take, on average, for you to cut through the timber section. Display this value to the command window as ave passes. Round this value up to the nearest whole integer using the ceil function. Answer: 11 passes. 3. When cutting a 2" x 4" timber column for use in building a house, the position of the saw blade as it cuts through the material may be given by the expression: Xi+1 = xi + s where xi is the current position of the sawblade in the material, Xi+1 is the position of the sawblade in the material after making a cutting pass with the saw, and the length s is the distance you cut through the material with one pass of the saw blade. Assume that each time you make a pass with the blade, you randomly cut through between 0.3 and 0.5 inches of material. You wish to know how many passes of the saw are required to cut through the long side of the 2" x 4" section, on average. a First, write a script that uses a while loop which calculates how many passes of the saw are required to cut through the 4" long section of the 2" x 4" cross-section. You should start at a position of O, then randomly add between 0.3 and 0.5 inches to the position of your blade, counting the number of passes required as you go, until you reach 4 inches of length. You can generate the random cutting depth with the commands = randi ([30,50])/100. b. Then, once your while loop is working, incorporate a for loop that executes the calculation in part (a) 1000 times. c. Finally, using the code, determine how many passes of the saw it will take, on average, for you to cut through the timber section. Display this value to the command window as ave passes. Round this value up to the nearest whole integer using the ceil function. Answer: 11 passes

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

Students also viewed these Databases questions

Question

Trigonometric equation and graph of y=sin(2x-pi/2)+2

Answered: 1 week ago

Question

Compose the six common types of social business messages.

Answered: 1 week ago

Question

Describe positive and neutral messages.

Answered: 1 week ago