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 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
None
Q4: Create a Visual Basic Project to find the value of the following series: h? h4 h3 cos(h) = h – 2! 3! 4! Write the code program so that the value of angle (h) is entered into inputbox. Estimate the value of series (cos(h)) so that the absolute value of any term is greater or equal to 10-6. Display the required number of terms (N) which it used in this series in a text box and display the result of series (cos(h)) in another separate text box.
Ql: Write true or false a- The body is constant when no force effect of this. b- The moment is force x distance. c- Force is vector quantity. d- The force in the engineering dynamics is zero. e- Space is the geometric region for two coordinates and three coordinates. f- Particle is zero dimensions but have weight. g- Acceleration is a scaler quantity. h- We can use tan law to solve the problems. i- We use the plus in the cosine law when the angle between two force. j- Rivet between two plates is external force.

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