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
Determine whether each statement is true or false, HELP
EleoNora [17]
1. false
2. true
3. false
4. true
5. false
hope this helps:)
3 0
3 years ago
5. Order these from least to greatest.<br> 1/2,4/9, 2/3,5/6
stiks02 [169]

Answer: this is the correct order:    4/9,1/2,2/3,5/6

Step-by-step explanation:

7 0
3 years ago
Nobody answer this but the baby toda profile then you can asnwer
Luba_88 [7]

WOWWWWWWWWWWWWWWWWW

Step-by-step explanation:

5 0
3 years ago
Elimination Method<br> 2x-4y=12 -x+2y=-6
Readme [11.4K]

Answer:

The given system has INFINITE NUMBER OF SOLUTIONS.

Step-by-step explanation:

Here, the given system of equation is given as:

2 x - 4 y = 12   ...  (1)

- x + 2 y = -6   ......  (2)

Now, to use the ELIMINATION METHOD we either need to cancel out x coefficients or the y coefficient.

Now, to cancel out the x- coefficient in both the equations:

Multiply equation (2) with 2 and add with (1), we get:

2 x  - 2x + 4 y - 4 y = 12 - 12  

or, 0 = 0

Hence, the given system has INFINITE NUMBER OF SOLUTIONS.

5 0
4 years ago
a can contains 8 chips 3 are grey 4 are red and 1 is white what is the probability of drawing a white chip
saul85 [17]
1/8 is the answer. sorry if its wrong, I am not that good at maths
4 0
4 years ago
Read 2 more answers
Other questions:
  • Kendra has a painting canvas that is 22 inches wide by 30 inches high. She painted a red rose, which covered 30% of the canvas.
    5·1 answer
  • Need answers fast please
    13·1 answer
  • Find the component of a velocity vector of an airplane that is traveling 150 mph at 45° below horizontal.
    6·2 answers
  • PLEASE HELP QUICK WILL MARK BRAINLIEST!!!!!!!!!
    6·2 answers
  • Can someone pls help me with this question
    13·1 answer
  • #1.) What is the slope between point C and Point D? *Please Show All Work*
    5·1 answer
  • Dakota's wading pool has a volume of 8,640 cubic inches. Which could be the dimensions of the wading pool? Mark all that apply.
    10·1 answer
  • Please answer this correctly
    8·2 answers
  • An equation of the line that passes through (3, 1) and (0, 10).
    15·1 answer
  • Expand the expression: (x-4)(2x+4)
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!