Thinking Like an Engineer
Thinking Like an Engineer
4th Edition
ISBN: 9781269910989
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: Pearson Learning Solutions
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 20, Problem 6ICA

Write a function named CLASS that will accept a vector of unknown length called INT and return four variable containing the following information about the contents of the vector.

  • 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:

Chapter 20, Problem 6ICA, Write a function named CLASS that will accept a vector of unknown length called INT and return four

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.

Blurred answer
Students have asked these similar questions
An ideal gas is enclosed in a cylinder which has a movable piston. The gas is heated, resulting in an increase in temperature of the gas, and work is done by the gas on the piston so that the pressure remains constant. a) Is the work done by the gas negative, positive or zero? b) From a microscopic view, how is the internal energy of the gas molecules affected? c) Is the heat less than, greater than or equal to the work? Explain you answer.
I need to adapt a real-life system to this assignment. It doesn't need to be a very complicated system. I am a senior mechanical engineering student. I need help with my mechanical theory homework
state all the formulae associated with adiabatic process

Chapter 20 Solutions

Thinking Like an Engineer

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