Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
3rd Edition
ISBN: 9780133593211
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 20, Problem 1ICA

Answer the question with each of the following code segments. If an error will occur, write ERROR and explain what caused the error.

a.    What is stored in Count by the following code?

Chapter 20, Problem 1ICA, Answer the question with each of the following code segments. If an error will occur, write ERROR , example  1

b.    What is displayed on the screen by the following code?

Chapter 20, Problem 1ICA, Answer the question with each of the following code segments. If an error will occur, write ERROR , example  2

c.    What is displayed on the screen by the following code?

Chapter 20, Problem 1ICA, Answer the question with each of the following code segments. If an error will occur, write ERROR , example  3

d.    What is stored in P and C after the following code executes?

Chapter 20, Problem 1ICA, Answer the question with each of the following code segments. If an error will occur, write ERROR , example  4

a.

Expert Solution
Check Mark
To determine

What variable is stored in Count.

Answer to Problem 1ICA

The variable stored in Count is 8.

Explanation of Solution

Given data:

Count =0;

for N=10:-0.2:8.5;

Count=Count+1;

end

Program execution:

Steps to execute the MATLAB program:

  1. 1. Open the command window and paste the given program.
  2. 2. Press enter.
  3. 3. Output is displayed in command window.

Enter Count in the command window and execute the program.

>> Count

Count =

     8

Conclusion:

Thus, the variable stored in Count is 8.

b.

Expert Solution
Check Mark
To determine

What is displayed on the screen after executing the given program.

Answer to Problem 1ICA

The output displayed on the screen:

6

12

20

30

42

56

Explanation of Solution

Given data:

for m=3:8

fprintf('%0.0f\n',m^2-m)

end

Program execution:

Steps to execute the MATLAB program:

  1. 1. Open the command window and paste the given program.
  2. 2. Press enter.
  3. 3. Output is displayed in command window.

MATLAB Output after execution of program is displayed as follows.

6

12

20

30

42

56

Conclusion:

Thus, the Output displayed on the screen:

6

12

20

30

42

56

c.

Expert Solution
Check Mark
To determine

What is displayed on the screen after executing the given program.

Answer to Problem 1ICA

The output displayed in the screen is 56.

Explanation of Solution

Given data:

for m=3:8;

M2=m^2-m;

end

fprintf('%0.0f\n',M2)

Program execution:

Steps to execute the MATLAB program:

  1. 1. Open the command window and paste the given program.
  2. 2. Press enter.
  3. 3. Output is displayed in command window.

MATLAB Output after execution of program is displayed as follows.

56

Conclusion:

Thus, the output displayed in the screen is 56.

d.

Expert Solution
Check Mark
To determine

What variables are stored in p and C.

Answer to Problem 1ICA

The variables stored in in p and C are p=945 and C=4.

Explanation of Solution

Given data:

S=3;

I=2;

P=1;

C=0;

for K=S:I:S^I

P=P*K;

C=C+1;

end

Program execution:

Steps to execute the MATLAB program:

  1. 1. Open the command window and paste the given program.
  2. 2. Press enter.
  3. 3. Output is displayed in command window.

Enter P and C in the command window and execute the program.

>> P

P =

   945

>> C

C =

     4

Conclusion:

Thus, the variables stored in in p and C are p=945 and C=4.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
As shown in the figure below, moist air at T₁ = 36°C, 1 bar, and 35% relative humidity enters a heat exchanger operating at steady state with a volumetric flow rate of 10 m³/min and is cooled at constant pressure to 22°C. Ignoring kinetic and potential energy effects, determine: (a) the dew point temperature at the inlet, in °C. (b) the mass flow rate of moist air at the exit, in kg/min. (c) the relative humidity at the exit. (d) the rate of heat transfer from the moist air stream, in kW. (AV)1, T1 P₁ = 1 bar 11 = 35% 120 T₂=22°C P2 = 1 bar
Air at T₁-24°C, p₁-1 bar, 50% relative humidity enters an insulated chamber operating at steady state with a mass flow rate of 3 kg/min and mixes with a saturated moist air stream entering at T₂-7°C, p2-1 bar. A single mixed stream exits at T3-17°C, p3-1 bar. Neglect kinetic and potential energy effects Step 1 Your answer is correct. Determine mass flow rate of the moist air entering at state 2, in kg/min. m2 = 2.1 Hint kg/min Using multiple attempts will impact your score. 5% score reduction after attempt 2 Step 2 Determine the relative humidity of the exiting stream. Փ3 = i % Attempts: 1 of 3 used
A reservoir at 300 ft elevation has a 6-in.-diameter discharge pipe located 50 ft below the surface.  The pipe is 600 ft long and drops in elevation to 150 ft where the flow discharges to the atmosphere. The pipe is made of riveted steel with a roughness height of 0.005 ft.   Determine the flow rate without a head loss Determine the flow rate with the pipe friction head loss. (hints:  Since the velocity is not known for part b and the Reynolds number and friction factor depend on velocity, you will need to iterate to find the solution.  A good first guess is the velocity from part (a))

Chapter 20 Solutions

Thinking Like an Engineer: An Active Learning Approach (3rd Edition)

Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
The Robot Revolution: The New Age of Manufacturing | Moving Upstream; Author: Wall Street Journal;https://www.youtube.com/watch?v=HX6M4QunVmA;License: Standard Youtube License