1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SpyIntel [72]
3 years ago
7

Write a function that will take in the dimensions of the box, length, width, and height, and the radius of the hole, and determi

ne the volume of material remaining. Assume the hole has been drilled along the height direction and that the hole has radius less than min(length/2, width/2).
Mathematics
1 answer:
Y_Kistochka [10]3 years ago
6 0

Answer:

The code is written line wise in MATLAB. The code is explained by comments, which are written after % sign in bold. Note: Comments are not the part of code.

Step-by-step explanation:

L = input('Enter the Length of Box [meters]:');   %First we take length input and save in variable L

W = input('Enter the Width of Box [meters]:');   %We take length input and save in variable W

H = input('Enter the Height of Box [meters]:');   %We take length input and save in variable H

R = input('Enter the Radius of Hole [meters]:');   %We take length input and save in variable R

if R >= min(L/2,W/2) %Condition for the radius greater than half of shorter dimension    

   disp('Error! Radius must be less than the half of the shorter dimension among length and width');

else

   Vb = L*H*W;   % Calculating Total Volume of Box and save in Vb

   Vh = pi*(R^2)*H;  %Calculating Volume of Hole and save in Vh

   Vr = Vb - Vh;   %Calculating remaining volume and save in Vr

   fprintf('The remaining volume of box is ');  

   fprintf('%.f2',Vr);  %Display Answer

   fprintf(' cubic meter');

end

<h2><u>SAMPLE RUN:</u></h2>

Enter the Length of Box [meters]:3

Enter the Width of Box [meters]:3

Enter the Height of Box [meters]:3

Enter the Radius of Hole [meters]:1

The remaining volume of box is 182 cubic meter>>

You might be interested in
8 freshmen, 7 sophomores, 10 juniors, and 6 seniors are eligible to be on a committee. If a committee of 14 students is chosen a
docker41 [41]

Answer:

0.00466

Step-by-step explanation:

8+7+10+6 = 31

(8C2×7C3×10C4×6C5) ÷ 31C14

= 0.004656415426

= 0.00466 (3 sf)

6 0
4 years ago
In basketball game,carolyn made 14 out of 20 shots anna made 16 out of 24 shots. explain how you can tell if the two players mad
Naddik [55]

Answer:

14/20 is simplified to 7/10. 16/24 is simplified to 2/3 they are not proportional.

Step-by-step explanation:

7 0
3 years ago
Select one:
mylen [45]
You know from the definitions of trig functions that
.. tan(42°) = (height of courthouse above measuring device)/(distance to courthouse)
.. (height of courthouse above measuring device) = tan(42°)*(305 ft) ≈ 274.6 ft

Since the measuring device is 5 ft high, the height of the courthouse is approximately 280 ft. (selection C)
5 0
3 years ago
Write the number thirty five million thirty thousand
Shtirlitz [24]
35,030,000 is the correct answer, hope this helps.

7 0
3 years ago
Read 2 more answers
What is the perimeter of a square of the side length is 3 cm
murzikaleks [220]

Answer:

Perimeter  = 12

Step-by-step explanation:

Perimeter of a square:  P = 4(s)

P = Perimeter

S = side

<u>Step 1:</u>  Calculate

P = 4(3)

P = 12

7 0
4 years ago
Other questions:
  • karen has 7 1/2 cups of milk and needs to fill it equally in glasses that hold 3/4 of a cup each. How many glasses can she fill?
    11·2 answers
  • Which statement illustrates the Distributive Property of scalar multiplication? (Assume that A and B are matrices and c and d ar
    9·2 answers
  • A skateboarder traveled 3/5 of a mile in 1/20 of an hour. What was the skateboarder's speed in miles per hour
    12·2 answers
  • What is 51450 divided by 98
    7·1 answer
  • Institute for Healthcare Improvement (IHI) proposed a process for quality improvement with steps known as â PDSA.
    7·1 answer
  • Mary draws the number line below to represent the solution set of the inequality 50 – 8t &lt; 90. What mistake did Mary make? Us
    8·1 answer
  • PLEASE HELP URGENT!!!!
    6·1 answer
  • The area of square ABCD is 144 square units. The area of square EFGH is 64 square
    12·2 answers
  • What is 124 * 324 I have to add more characters
    9·1 answer
  • Pls help me out on this question, Find the sum of this first 8 terms of the Arithmetic Progression. log x, log x2, logx3
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!