Thinking Like an Engineer: An Active Learning Approach (4th Edition)
4th Edition
ISBN: 9780134639673
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 19, Problem 31ICA
Write a function named CLASS that will accept a
- NotInt––contains the number of values in INT that are not integers.
- NotPos––contains the number of values in INT that are zero or less.
- TooBig––contains the number of values in INT that are greater than 99. Note that NotInt has priority over NotPos and TooBig. For example, an element in INT equal to –9.43 would add one to NotInt, but not to NotPos.
- Ints––a 99 element vector in which each element contains the number of occurrences of the element’s index value in INT. For example. If INT contains a total of fourteen 57s. Ints (57) will contain 14.
Example:
All other elements of Ints contain a zero.
Note that the sum of all elements in the returned variable should equal the number of elements in INT.
You may not use any built in functions to count the number of occurrences of each integer between 1 and 99, nor may you use any function whose sole purpose is to determine if a value is an integer or not. You may use other functions, however.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Solve this problem and show all of the work
Practice
L[sin at]
Find the Hertzian stresses and the maximum shear stress for the wheel.
Chapter 19 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Ch. 19.1 - Create a written algorithm to multiply all integer...Ch. 19.1 - Create a graphical algorithm to multiply all...Ch. 19.1 - Prob. 3CCCh. 19.2 - Assume a vector v2 has already been defined and...Ch. 19.2 - Prob. 5CCCh. 19.2 - Write a while loop that requires the user to input...Ch. 19.2 - Write a program that asks the user to enter a...Ch. 19.2 - Prob. 8CCCh. 19.2 - Prob. 9CCCh. 19.2 - Write a section of code that will ask the user to...
Ch. 19.3 - Write a for loop to display every even number from...Ch. 19.3 - Write a for loop to display every multiple of 5...Ch. 19.3 - Write a for loop to display every odd number from...Ch. 19.3 - Assume a vector Vals has already been defined....Ch. 19.3 - Consider the following table of values. Determine...Ch. 19.3 - Write two nested for loops to determine how many...Ch. 19.3 - Assume a matrix MZ has already been defined. Write...Ch. 19.3 - Prob. 18CCCh. 19.3 - Determine the output of the following code:Ch. 19 - Prob. 1ICACh. 19 - Create a written algorithm or flowchart as...Ch. 19 - Create a written algorithm or flowchart as...Ch. 19 - Create a written algorithm or flowchart as...Ch. 19 - Create a written algorithm or flowchart as...Ch. 19 - Create a written algorithm or flowchart as...Ch. 19 - Create a written algorithm or flowchart as...Ch. 19 - For each of the following code segments, determine...Ch. 19 - a. Assume CA1 and CA2 are cell arrays that both...Ch. 19 - Fill in the table with the values of k, b, x, and...Ch. 19 - Assume that a simple menu has been created by the...Ch. 19 - Write a MATLAB program to implement the algorithm...Ch. 19 - Write a program that will ask the user to input a...Ch. 19 - Write a MATLAB program to implement the algorithm...Ch. 19 - Write a function named CountDown that accepts a...Ch. 19 - While experimenting with coding sequences, you...Ch. 19 - Answer the question with each of the following...Ch. 19 - For each of the following code segments, determine...Ch. 19 - a.Explain what the following function does,...Ch. 19 - For each of the following code segments, determine...Ch. 19 - Prob. 23ICACh. 19 - Prob. 24ICACh. 19 - Write a MATLAB program to implement the algorithm...Ch. 19 - Prob. 26ICACh. 19 - Write a function named GetArray that will accept...Ch. 19 - Assume the vector AM contains an even number of...Ch. 19 - Write a function named EvenSum that will accept a...Ch. 19 - Prob. 30ICACh. 19 - Write a function named CLASS that will accept a...Ch. 19 - You are assessing the price of various components...Ch. 19 - You are studying the number of defective parts...Ch. 19 - The pascal triangle an amazing number of uses,...Ch. 19 - Write a function named Prodstate that will accept...Ch. 19 - Design a flowchart for a program to help students...Ch. 19 - Create an algorithm to allow the user to enter a...Ch. 19 - Write a program to implement the algorithm...Ch. 19 - A zombie picks up a calculator and starts adding...Ch. 19 - Write a function called Balloon that will accept a...Ch. 19 - Prob. 7RQCh. 19 - Prob. 8RQCh. 19 - You are to program part of the interface for a...Ch. 19 - Prob. 13RQCh. 19 - A matrix names mach contains three columns of data...Ch. 19 - Prob. 15RQCh. 19 - You are programming the control system for a robot...Ch. 19 - Write a program to implement the GPA calculator...Ch. 19 - The Fibonacci sequence is an integer sequence...Ch. 19 - As early as 650 BC, mathematicians have been...Ch. 19 - Write a program to analyze the cooling of a cup of...Ch. 19 - After numerous experiments with a circuit...
Knowledge Booster
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
- Can I get help on this question?arrow_forwardDuring some actual expansion and compression processes in piston–cylinder devices, the gases have been observed to satisfy the relationship PVn = C, where n and C are constants. Calculate the work done when a gas expands from 350 kPa and 0.03 m3 to a final volume of 0.2 m3 for the case of n = 1.5. The work done in this case is kJ.arrow_forwardCarbon dioxide contained in a piston–cylinder device is compressed from 0.3 to 0.1 m3. During the process, the pressure and volume are related by P = aV–2, where a = 6 kPa·m6. Calculate the work done on carbon dioxide during this process. The work done on carbon dioxide during this process is kJ.arrow_forward
- The volume of 1 kg of helium in a piston–cylinder device is initially 5 m3. Now helium is compressed to 3 m3 while its pressure is maintained constant at 130 kPa. Determine the initial and final temperatures of helium as well as the work required to compress it, in kJ. The gas constant of helium is R = 2.0769 kJ/kg·K. The initial temperature of helium is K. The final temperature of helium is K. The work required to compress helium is kJ.arrow_forwardA piston-cylinder device initially contains 0.4 kg of nitrogen gas at 160 kPa and 140°C. Nitrogen is now expanded isothermally to a pressure of 80 kPa. Determine the boundary work done during this process. The properties of nitrogen are R= 0.2968 kJ/kg-K and k= 1.4. N₂ 160 kPa 140°C The boundary work done during this process is KJ.arrow_forward! Required information An abrasive cutoff wheel has a diameter of 5 in, is 1/16 in thick, and has a 3/4-in bore. The wheel weighs 4.80 oz and runs at 11,700 rev/min. The wheel material is isotropic, with a Poisson's ratio of 0.20, and has an ultimate strength of 12 kpsi. Choose the correct equation from the following options: Multiple Choice о σmax= (314) (4r2 — r²) - о σmax = p² (3+) (4r² + r²) 16 σmax = (314) (4r² + r²) σmax = (314) (4² - r²)arrow_forward
- I don't know how to solve thisarrow_forwardI am not able to solve this question. Each part doesn't make sense to me.arrow_forwardExercises Find the solution of the following Differential Equations 1) y" + y = 3x² 3) "+2y+3y=27x 5) y"+y=6sin(x) 7) y"+4y+4y = 18 cosh(x) 9) (4)-5y"+4y = 10 cos(x) 11) y"+y=x²+x 13) y"-2y+y=e* 15) y+2y"-y'-2y=1-4x³ 2) y"+2y' + y = x² 4) "+y=-30 sin(4x) 6) y"+4y+3y=sin(x)+2 cos(x) 8) y"-2y+2y= 2e* cos(x) 10) y+y-2y=3e* 12) y"-y=e* 14) y"+y+y=x+4x³ +12x² 16) y"-2y+2y=2e* cos(x)arrow_forward
- Qu. 15 What are the indices for the Plane 1 drawn in the following sketch? Qu. 16 What are the Miller indices for the Plane shown in the following cubic unit cell? this is material engineering please show all workarrow_forwardI do not understand how to approach this question. I tried to answer it but I kept getting it incorrect.arrow_forward(read image)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
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