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 19, Problem 1ICA

Answer the following questions.

a. For what integer values of D will the code between if and end execute?

if D >= – 1 && 3 > D

code

end

b. For what values of F will the code between if and end execute?

if F >= 100 || F <= 5

code

end

c. What combinations of values for B and Q will cause a warning to be displayed?

if B >100 || (B<20 && Q~=0)

fprintf ('WARNING! Pararneters out of bounds. \n')

end

a.

Expert Solution
Check Mark
To determine

Find the integer values for which the code inside the if and end executes.

Answer to Problem 1ICA

The integer values for which the code inside the if and end executes are 1D<3_.

Explanation of Solution

The English translation of the if statement says that, the if statement is true when the variable D is greater than or equal to -3 and less than 1.

So from the number line, the values of D for which the expression is true are 1D<3.

Conclusion:

Hence, the integer values for which the code inside the if and end executes are 1D<3_.

b.

Expert Solution
Check Mark
To determine

Find the integer values for which the code inside the if and end executes.

Answer to Problem 1ICA

The integer values for which the code inside the if and end executes are F(5,100)_.

Explanation of Solution

The English translation of the if statement says that, the if statement is true when the variable F is greater than or equal to 100 or less than or equal to 5.

So from the number line, the values of F for which the expression is true are F(5,100), where denotes the set of real numbers.

That is F can be any real number excluding numbers between 5 to 100.

Conclusion:

Hence, the integer values for which the code inside the if and end executes are F(5,100)_.

c.

Expert Solution
Check Mark
To determine

Find the integer values for which the code inside the “if” and “end” executes.

Answer to Problem 1ICA

The integer values for which the code inside the “if” and “end” executes are B={B>100,Q=0B<20,Q0_.

Explanation of Solution

The English translation of the if statement says that, the if statement is true when the variable B is greater than 100 or when B is less than 20 and Q is not 0.

So from the number line, the values of B and Q for which the expression is true are B={B>100,Q=0B<20,Q0

Conclusion:

Hence, the integer values for which the code inside the “if” and “end” executes are B={B>100,Q=0B<20,Q0_.

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
Q3: Write two G-code programs using the following figure where units are in inches. a. The first program should use absolute positioning, and b. the second program should use incremental positioning. P4 Finish (6, 4) P2 (1, 3) P3 (4.79, 2) P1 Start (-2, 1) Center (2.5, 1) -2
LESSON: AUTODESK AUTOCAD Choose from the choices:
What is the error in the following code: x=[1:1:10]; y=[ 21 33 4 56 77 88 990 ; semilogy (x, y,'r--'); vectors must be the same lengths can't draw by semilogy x in not a vector there is no any error matlab (w = [1 0-9; 2 -2 0; 1 2 3]; ). What is the value of x(2,1) ? undefined O 2 O the whole second row

Chapter 19 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