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

Videos

Textbook Question
Book Icon
Chapter 20, Problem 11ICA

You are studying the number of defective parts produced each week by several machines to help adjust maintenance protocols.

Assume the rows of matrix Def represent different machines and all columns except the last represent weeks. The last column contains the long-term average of the number of defects per week produced by that machine. Write a short section of MATLAB code that will generate a new matrix Comp with the same number of rows but one fewer columns as described.

The code will compare each value in the matrix, except those in the last column, to the value in the last column of the same row to compare the number of defective parts produced by each machine each week with that machine’s long-term defect rate.

  • If the number of errors equals that machine’s average, the corresponding element in the new matrix Comp will equal 0.
  • If the number of errors is greater than machine’s average, the corresponding element in the new matrix Comp will equal 1.
  • If the number of errors is less than that machine’s average, the corresponding element in the new matrix Comp will equal –1.

Example:

Def = [ 3 6 9 2 7 7 0 6 3 2 1 3 12 7 9 2 11 8 ] Comp = [ 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 ]

Blurred answer
Students have asked these similar questions
MULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .
.
This code keeps on generating graphs with different curves. The picture that you see two different graphs comes from the same code but both of them have different curves. I need the curve to look like the picture that only has one graph. I basically need the line to have a slight curve and every time I run the code it will come up as the same graph every time. Use this code on MATLAB and fix it % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Use the 'seed' function instead of 'rng' seed = 50; % Define your seed here rand('seed',seed); % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit…

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
Dimensional Analysis - in physics; Author: Jennifer Cash;https://www.youtube.com/watch?v=c_ZUnEUlTbM;License: Standard youtube license